gerrit:
    build: gerrit/
    expose:
        - "8080"
    environment:
        # http
        "PROXY_URL":

        # ldap
        "LDAP_URL":
        "LDAP_ACCOUNT_BASE":
        "LDAP_GROUP_BASE":

        # smtp
        "SMTP_SERVER":
        "SMTP_SERVER_PORT":
        "SMTP_FROM":

        # jira
        "JIRA_URL":
    volumes:
        - ./data/gerrit-volume:/home/gerrit/review_site
nexus:
    build: nexus/
    expose:
        - "8081"
    volumes:
         - ./data/nexus-volume:/opt/sonatype/nexus/data
jenkins:
    build: jenkins/
    expose:
        - "8080"
    volumes:
        - ./data/jenkins-volume:/var/jenkins_home
        - /var/run/docker.sock:/run/docker.sock
    environment:
        JAVA_OPTS: "-Djava.awt.headless=true"
    links:
        - gerrit
        - nexus
proxy:
    image: nginx
    ports:
        - "80:80"
    links:
        - gerrit
        - jenkins
        - nexus
    volumes:
        - ./proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro


version: '2'
services:
    gerrit:
        build: gerrit/
        expose:
            - "8080"
        environment:
            # http
            "PROXY_URL":

            # ldap
            "LDAP_URL":
            "LDAP_ACCOUNT_BASE":
            "LDAP_GROUP_BASE":

            # smtp
            "SMTP_SERVER":
            "SMTP_SERVER_PORT":
            "SMTP_FROM":

            # jira
            "JIRA_URL":
        volumes:
            - ./data/gerrit-volume:/home/gerrit/review_site
    nexus:
        build: nexus/
        expose:
            - "8081"
        volumes:
             - ./data/nexus-volume:/opt/sonatype/nexus/data
    jenkins:
        build: jenkins/
        expose:
            - "8080"
        volumes:
            - ./data/jenkins-volume:/var/jenkins_home
            - /var/run/docker.sock:/run/docker.sock
        environment:
            JAVA_OPTS: "-Djava.awt.headless=true"
        links:
            - gerrit
            - nexus
    proxy:
        image: nginx
        ports:
            - "80:80"
        links:
            - gerrit
            - jenkins
            - nexus
        volumes:
            - ./proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro


Migrate to Docker Compose v2
Migrate to Docker Compose v2
