Last active
April 14, 2020 11:28
-
-
Save ohmydevops/52ace2ab5dd79d17c717f3f2e9ef7ff8 to your computer and use it in GitHub Desktop.
Drone CI docker-compose file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
drone-server: | |
container_name: drone-server | |
image: drone/drone:1.6 | |
volumes: | |
- ./drone_data:/var/lib/drone/ | |
- /var/run/docker.sock:/var/run/docker.sock | |
ports: | |
- "8000:80" | |
- "8001:443" | |
user: root | |
restart: always | |
depends_on: | |
- db | |
environment: | |
- DRONE_SERVER_HOST= | |
- DRONE_GITEA_SERVER= | |
- DRONE_SERVER_PROTO=https | |
- DRONE_RPC_SECRET= | |
- DRONE_USER_CREATE= | |
- DRONE_AGENTS_ENABLED=true | |
- DRONE_ADMIN= | |
- DRONE_GITEA=true | |
- DRONE_GIT_ALWAYS_AUTH=true | |
- DRONE_DOCKER_CONFIG=/root/.docker/config.json | |
- DRONE_DATABASE_DRIVER=postgres | |
- DRONE_DATABASE_DATASOURCE | |
- DRONE_GITEA_CLIENT_ID= | |
- DRONE_GITEA_CLIENT_SECRET= | |
# - DRONE_TLS_CERT= | |
# - DRONE_TLS_KEY= | |
# - DRONE_TLS_AUTOCERT= | |
# - DRONE_USER_FILTER= | |
drone-agent: | |
container_name: drone-agent | |
image: drone/drone-runner-docker:1 | |
command: agent | |
restart: always | |
user: root | |
depends_on: | |
- drone-server | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- /home/$USER/.docker/config.json:/root/.docker/config.json | |
environment: | |
- DRONE_RPC_HOST= | |
- DRONE_RPC_PROTO=https | |
- DRONE_RPC_SECRET= | |
- DRONE_RUNNER_CAPACITY=3 | |
- DRONE_RUNNER_NAME="local" | |
- DRONE_DOCKER_CONFIG=/root/.docker/config.json | |
db: | |
container_name: drone-postgresql | |
image: postgres:12.1 | |
user: root | |
volumes: | |
- ./postgresql_data:/var/lib/postgresql/data | |
restart: always | |
environment: | |
- POSTGRES_USER=drone | |
- POSTGRES_DB=drone | |
- POSTGRES_PASSWORD= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nginx.conf: