Skip to content

Instantly share code, notes, and snippets.

@ogavrisevs
Created June 3, 2016 16:15
Show Gist options
  • Save ogavrisevs/bb915e715f2cf9b7547a855cc92b4792 to your computer and use it in GitHub Desktop.
Save ogavrisevs/bb915e715f2cf9b7547a855cc92b4792 to your computer and use it in GitHub Desktop.
Drone 0.5 setup ( master + slave + gogs + postgres )
# set admin user
# docker exec -it postgres sh -c "psql -h postgres -U puser"
# \c postgres
# update users set user_admin=TRUE;
version: '2'
services:
gogs:
image: gogs/gogs:0.9.0
container_name: gogs
ports:
- "3000:3000"
- "10022:22"
postgres:
image: postgres
container_name: postgres
environment:
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "puser"
drone-master:
image: drone/drone:0.5
container_name: drone-master
privileged: true
ports:
- 8000:8000
environment:
- ESCALATE_FILTER=plugins/drone-docker plugins/drone-ecr plugins/drone-gcr
- PLUGIN_FILTER=plugins/*
- DRONE_GOGS=true
- DRONE_GOGS_URL=http://gogs:3000
- DRONE_GOGS_SKIP_VERIFY=true
- DRONE_OPEN=true
- I_UNDERSTAND_I_AM_USING_AN_UNSTABLE_VERSION=true
- I_AGREE_TO_FIX_BUGS_AND_NOT_FILE_BUGS=true
- DRONE_AGENT_SECRET=12345
- DRONE_ADMIN=admin
- DRONE_DEBUG=true
- DATABASE_DRIVER=postgres
- DATABASE_CONFIG=postgres://puser:password@postgres:5432/postgres?sslmode=disable
volumes:
- /var/lib/drone/
- /var/run/docker.sock:/var/run/docker.sock
links:
- gogs:gogs
- postgres:postgres
drone-slave:
image: drone/drone:0.5
container_name: drone-slave
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- GIN_MODE=debug
- DRONE_SERVER=http://drone-master:8000
- DRONE_DEBUG=true
- I_UNDERSTAND_I_AM_USING_AN_UNSTABLE_VERSION=true
- I_AGREE_TO_FIX_BUGS_AND_NOT_FILE_BUGS=true
- DRONE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoiMTIzNDUiLCJ0eXBlIjoiYWdlbnQifQ.Eg4uPUtj2gs3TmWI04RK3YcKXybqp7QSaUAUhCsgcc4
command: agent
links:
- drone-master:drone-master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment