docker-compose for using team tools

Could you provide a docker-compose file for the team tools docker-images, using a nginx reverse proxy preferably https://github.com/jwilder/nginx-proxy (so other services can easily be added to the reverse proxy as well) .

1
8 comments

ehm, well, this is a part of what I ended up with .. but it should work .

Difference is that I use different domain names than those given in this file (see VIRTUAL_HOST=... settings) .

And I have ssl-certificates for those domain names in a directory called ssl, for the proxy to use .

Another thing may be that you need to start the proxy first and than the other services .

I am on a linux system, I don't know whether the volumes will work on windows .

Of course the domain names need to be resolvable, you could try this by putting us.dmz, tc.dmz et cetera in your /etc/hosts, pointing to your the ip address of the docker bridge network.

The part for the teamcity_agent seems to have some issues with indenting. If you don't have a custom Dockerfile for the agent(s), you could change the build-part to image: jetbrains/teamcity-agent (or miniminal-agent).

2
version: "2.0"
services:
    nginx-proxy:
        image: jwilder/nginx-proxy:alpine
        container_name: nginx-proxy
        restart: unless-stopped
        network_mode: bridge
        ports:
            - 80:80
            - 443:443
        volumes:
            - ./ssl:/etc/nginx/certs
            - /var/run/docker.sock:/tmp/docker.sock:ro
        environment:
            - ENABLE_IPV6=true
    hub:
        #restarts Docker container when stopped for unexpected reason
        restart: unless-stopped
        network_mode: bridge
        image: jetbrains/hub:2018.1.8691
        container_name: hub-server-instance
        expose:
            - 8080
        environment:
            - VIRTUAL_HOST=hub.dmz
            - VIRTUAL_PORT=443
            - HSTS=off
        volumes:
            - "/opt/jetbrains/hub/data/:/opt/hub/data"
            - "/opt/jetbrains/hub/conf/:/opt/hub/conf"
            - "/opt/jetbrains/hub/logs/:/opt/hub/logs"
            - "/opt/jetbrains/hub/backups/:/opt/hub/backups"
    upsource:
        restart: unless-stopped
        network_mode: bridge
        image: jetbrains/upsource:2017.3.2774
        container_name: upsource-server-instance
        expose:
            - 8080
        environment:
            - VIRTUAL_HOST=us.dmz
            - VIRTUAL_PORT=443
            - HSTS=off
        volumes:
            - "/opt/jetbrains/upsource/data/:/opt/upsource/data"
            - "/opt/jetbrains/upsource/conf/:/opt/upsource/conf"
            - "/opt/jetbrains/upsource/logs/:/opt/upsource/logs"
            - "/opt/jetbrains/upsource/backups/:/opt/upsource/backups"
    teamcity:
        restart: unless-stopped
        network_mode: bridge
        image: jetbrains/teamcity-server
        container_name: teamcity-server-instance
        expose:
            - 8111
        environment:
            - VIRTUAL_HOST=tc.dmz
            - VIRTUAL_PORT=443
            - HSTS=off
        volumes:
            - "/opt/jetbrains/teamcity/data/:/data/teamcity_server/datadir"
            - "/opt/jetbrains/teamcity/logs/:/opt/teamcity/logs"
    teamcity_agent_1:
        service: teamcity_agent
        links:
            - "teamcity:teamcity"
        restart: unless-stopped
        network_mode: bridge
        build:
        context: ./teamcity_agent/
        dockerfile: agent.Dockerfile
        environment:
        SERVER_URL: teamcity:8111
        AGENT_NAME: "agent_1"
        volumes:
            - "/opt/jetbrains/teamcity_agent/config:/data/config"
            - "/opt/jetbrains/teamcity/data/teamcity_agent_1/:/data/teamcity_agent/conf"
1

Hi WIll,

This is actually working for you? I am new to this and I don't know how to do it in order to work.

I face this problems:
- I am using this on windows so how do I access the hub, upsource or teamcity sites in browser? I should change the hosts file for redirecting hub.dmz to localhost for example?
- after setting up the hub how can I point the other apps to use it? http://hub.dmz:8001/hub doesn't seems to work.

0

Thanks for the answer. I will give it a try.

0

I know this is kinda old at this point, and I apologize for resurrecting, but I'm currenting looking for the same and wondering if you guys have an up-to-date version?

0

Hello Nate, please accept our sincerest apologies that we have missed your comment.
Is your question still relevant? Please let us know if you still need our assistance, we’ll be happy to help.
If you have urgent questions, please feel free to submit a  support request: https://hub-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=66692

0

Some guide to Setup a full Docker Stack with all the Team Tools working with each other would be really usefull.

0

Please sign in to leave a comment.