drone ohne Postgres oder extra Agent Container

This commit is contained in:
bmen 2020-10-08 12:23:59 +02:00
parent 09e523f2ee
commit e3446e9814
1 changed files with 21 additions and 55 deletions

View File

@ -1,66 +1,32 @@
version: "2" version: "2"
networks: networks:
webproxy:
external: true
backend-gitea: backend-gitea:
external: true external: true
services: services:
drone-server: drone:
image: drone/drone:1.2.1 container_name: drone
container_name: drone-server image: drone/drone:1.9
ports:
- 8888:8888
volumes:
- /opt/appdata/drone/drone-server:/var/lib/drone/
restart: always restart: always
environment: environment:
- DRONE_OPEN=true
- DRONE_GITEA=true
- DRONE_NETWORK=backend-gitea
- DRONE_DEBUG=true
- DRONE_ADMIN=${DRONE_ADMIN}
- DRONE_USER_CREATE=username:${DRONE_ADMIN},admin:true
- DRONE_SERVER_PORT=:8888
- DRONE_DATABASE_DRIVER=postgres
- DRONE_DATABASE_DATASOURCE=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable
- DRONE_GIT_ALWAYS_AUTH=false
- DRONE_GITEA_SERVER=https://git.bmen.cc - DRONE_GITEA_SERVER=https://git.bmen.cc
- DRONE_RPC_SECRET=§{DRONE_RPC_SECRET} - DRONE_GIT_ALWAYS_AUTH=false
- DRONE_SERVER_HOST=0.0.0.0:8888 - DRONE_RUNNER_CAPACITY=1
- DRONE_HOST=http://0.0.0.0:8888 - DRONE_SERVER_HOST=drone.bmen.cc
- DRONE_SERVER_PROTO=http - DRONE_SERVER_PROTO=https
- DRONE_TLS_AUTOCERT=false - DRONE_TLS_AUTOCERT=false
- DRONE_AGENTS_ENABLED=true - DRONE_GITEA_CLIENT_ID=client-id
networks: - DRONE_GITEA_CLIENT_SECRET=client-secret
- backend-gitea - VIRTUAL_HOST=drone.bmen.cc
- VIRTUAL_PORT=80
drone-db: - DRONE_USER_CREATE=username:${DRONE_ADMIN},admin:true
image: postgres:alpine
container_name: drone-db
restart: always
volumes:
- /opt/appdata/drone/drone-db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
networks:
- backend-gitea
drone-agent:
image: drone/agent:1.2.1
container_name: drone-agent
command: agent
restart: always
depends_on:
- drone-server
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- /opt/appdata/drone/drone-agent:/data - /opt/appdata/drone/drone-db:/data
environment:
- DRONE_RPC_SERVER=http://0.0.0.0:8888
- DRONE_RPC_SECRET=§{DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=1
- DRONE_RUNNER_NETWORKS=backend-gitea
networks: networks:
- backend-gitea - backend-gitea
- webproxy