diff --git a/woodpecker/.env.example b/woodpecker/.env.example new file mode 100644 index 0000000..b59047f --- /dev/null +++ b/woodpecker/.env.example @@ -0,0 +1,15 @@ +# Allow all users to use it +DRONE_OPEN=true +# Drone needs to know its own location +DRONE_HOST= +# Shared secret to communicate with agents +DRONE_SECRET= + +# Tell Drone to use postgres +DRONE_DATABASE_DRIVER=postgres +DRONE_DATABASE_DATASOURCE=postgres://woodpecker:woodpecker@db:5432/woodpecker?sslmode=disable + +# These are just a guess based on the documentation +DRONE_GITEA=true +DRONE_GITEA_CLIENT= +DRONE_GITEA_SECRET= diff --git a/woodpecker/docker-compose.yml b/woodpecker/docker-compose.yml index b7f2211..41cdf12 100644 --- a/woodpecker/docker-compose.yml +++ b/woodpecker/docker-compose.yml @@ -17,28 +17,14 @@ services: timeout: '5s' start_period: '10s' - environment: - # Allow all Gitea users to use it - - 'DRONE_OPEN=true' - # Drone needs to know its own location - - 'DRONE_HOST=${DRONE_HOST}' - # Shared secret to communicate with agents - - 'DRONE_SECRET=${DRONE_SECRET}' - # Tell Drone to use postgres - - 'DRONE_DATABASE_DRIVER=postgres' - - 'DRONE_DATABASE_DATASOURCE=postgres://woodpecker:woodpecker@db:5432/woodpecker?sslmode=disable' - - # These are just a guess based on the documentation - - 'DRONE_GITEA=true' - - 'DRONE_GITEA_CLIENT=${GITEA_CLIENT}' - - 'DRONE_GITEA_SECRET=${GITEA_SECRET}' + env_file: + - '.env' networks: - 'default' - 'nginx' ports: # Used to communicate with the agents (I think) - '9000:9000' - # Also needs port 8000 for web UI (so proxy_pass to 8000) volumes: - 'server-data:/var/lib/drone' @@ -58,7 +44,6 @@ services: - 'POSTGRES_DB=woodpecker' - 'POSTGRES_USER=woodpecker' - 'POSTGRES_PASSWORD=woodpecker' - volumes: - 'db-data:/var/lib/postgresql/data' @@ -70,7 +55,8 @@ services: command: 'agent' depends_on: - - 'app' + app: + condition: 'service_healthy' environment: - 'DRONE_SERVER=${DRONE_HOST}'