Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sedro
Dec 31, 2008
Has anyone used TeamCity + Vagrant? I basically want TC to 'vagrant up' then run its build agent inside the VM. I could use a different build agent for each build but that immediately puts me into their enterprise pricing tier.

Adbot
ADBOT LOVES YOU

Sedro
Dec 31, 2008
I'm looking to separate my build server from my deployment. Currently TeamCity builds a feature branch then runs a shell script to start an environment locally (passing in the branch name). Instead I want to push the artifact to a QA server and deal with it there. A web interface to manage those environments would be nice too. What should I be looking for (besides a proper devops engineer)?

This is for the development team, not hosting customers. The build artifact is a set of docker images.

Sedro
Dec 31, 2008

Mr. Crow posted:

Anyone have experience setting up teamcity in a docker container behind a reverse proxy which is also in a container (nginx)?

I run teamcity in a docker container. There's nothing to it. Are you having a specific problem?

The latest teamcity can store its build configuration in code and version control it. They even have official docker images now. https://www.jetbrains.com/teamcity/whatsnew/

Sedro
Dec 31, 2008

Mr. Crow posted:

Related but tangential question, can someone explain to me the benefit of a docker data container vs just mounting a volume directly? It seems like an unnecessary layer of indirection, you're replacing being wired to the volume with being wired to the container. I'm missing something. You can share volumes between multiple containers in my experience so...?

You're right, there's no reason to use data containers now that named volumes are a thing.

Sedro
Dec 31, 2008

Dreadrush posted:

Hi I'm very new to the whole Docker thing and am trying to learn more about it.

I want to be able to deploy an nginx server that will host static files for my website. The static files are compiled by running webpack.

Currently, I have two containers:
web: uses FROM node:latest to take my source files, and builds the dist static files
nginx: uses FROM nginx to run nginx

I have a docker-compose file setup to run the two dockerfiles.

How can "copy" the files generated in the web container to the nginx container? The web container doesn't even have any server running - it has only created static files.
Should I only have one container (nginx) and be generating the static files all inside that?

I tried hosting an express server in the web container, and using a volume to share the generated files, which worked fine, however then on multiple deployments it seemed I had to do extra work to be deleting all the volumes first - it felt like I was doing this wrong. Also in the end all I need is the nginx server with static files - no node server running at any time.

If you're not deploying node, it shouldn't be included in your images.

Generate your static files outside docker and build them into the image.

code:
FROM nginx
COPY dist/ /var/www

Sedro
Dec 31, 2008
I've used puppet for a few things and it's always been a disaster. I'll find a package which does exactly what I want, great! Hours later I'm debugging compatibility issues in an package 3 dependencies deep. Oh, there's a PR to fix it. Opened a year ago.

Adbot
ADBOT LOVES YOU

Sedro
Dec 31, 2008
This thing will reverse proxy the docker port
https://github.com/jwilder/nginx-proxy

Then you can docker run -p 9999 -e VIRTUAL_HOST=${BRANCH_NAME}.yourdomain.com your-image

It's a pain in the rear end to debug though when something goes wrong

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply