# vim:ts=2:sts=2:sw=2:et # # Author: Hari Sekhon # Date: 2020-03-27 17:37:46 +0000 (Fri, 27 Mar 2020) # # https://github.com/HariSekhon/DevOps-Bash-tools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help improve or steer this or other code I publish # # https://www.linkedin.com/in/HariSekhon # version: '3' services: gocd-server: hostname: gocd-server image: gocd/gocd-server:v${VERSION:-20.2.0} ports: - 8153:8153 healthcheck: #test: ["CMD", "curl", "-f", "http://localhost:8153/go/api/v1/health"] # export DOCKER_HEALTHCHECK=/bin/true in development to bypass healthcheck test: "${DOCKER_HEALTHCHECK:-curl http://localhost:8153/go/api/v1/health}" interval: 30s #start_period: 30s # version 3.4+ timeout: 10s retries: 5 #environment: # CONFIG_GIT_REPO: ${CONFIG_GIT_REPO:-https://github.com/HariSekhon/DevOps-Bash-tools} # CONFIG_GIT_BRANCH: ${CONFIG_GIT_BRANCH:-master} # XXX: containers should be called gocd-agent as gocd.sh uses this to count the number of expected agents and wait for them to connect before authorizing them gocd-agent: # XXX: hostname must be set to gocd-agent to be recognized as an expected agent hostname: gocd-agent image: gocd/gocd-agent-ubuntu-18.04:v${VERSION:-20.2.0} ports: - 8152:8152 # needs root to be able to install OS package dependencies - 'sudo' not installed user: root:root environment: GO_SERVER_URL: http://gocd-server:8153/go AGENT_STARTUP_ARGS: -Dgo.agent.status.api.bind.host=0.0.0.0 healthcheck: #test: ["CMD", "curl", "-f", "http://localhost:8152/health/v1/isConnectedToServer"] # export DOCKER_HEALTHCHECK=/bin/true in development to bypass healthcheck test: "${DOCKER_HEALTHCHECK:-curl http://localhost:8152/health/v1/isConnectedToServer}" interval: 30s #start_period: 30s # version 3.4+ timeout: 10s retries: 5 restart: on-failure links: - gocd-server # gocd-agent2: # image: gocd/gocd-agent-ubuntu-18.04:v${VERSION:-20.2.0} # # needs root to be able to install OS package dependencies - 'sudo' not installed # user: root:root # environment: # GO_SERVER_URL: http://gocd-server:8153/go # restart: on-failure # links: # - gocd-server