parent
d706c5df48
commit
89eb22cedc
@ -0,0 +1,104 @@ |
||||
--- |
||||
version: '3.8' |
||||
|
||||
services: |
||||
drone-traefik: |
||||
image: traefik:2.4 |
||||
container_name: drone-traefik |
||||
restart: unless-stopped |
||||
volumes: |
||||
- ./traefik/acme.json:/acme.json |
||||
- /var/run/docker.sock:/var/run/docker.sock |
||||
networks: |
||||
- public |
||||
labels: |
||||
- 'traefik.enable=true' |
||||
- 'traefik.http.routers.api.rule=Host(`traefik.localdns.xyz`)' |
||||
- 'traefik.http.routers.api.entrypoints=https' |
||||
- 'traefik.http.routers.api.service=api@internal' |
||||
- 'traefik.http.routers.api.tls=true' |
||||
- 'traefik.http.routers.api.tls.certresolver=letsencrypt' |
||||
ports: |
||||
- 80:80 |
||||
- 443:443 |
||||
command: |
||||
- '--api' |
||||
- '--providers.docker=true' |
||||
- '--providers.docker.exposedByDefault=false' |
||||
- '--entrypoints.http=true' |
||||
- '--entrypoints.http.address=:80' |
||||
- '--entrypoints.http.http.redirections.entrypoint.to=https' |
||||
- '--entrypoints.http.http.redirections.entrypoint.scheme=https' |
||||
- '--entrypoints.https=true' |
||||
- '--entrypoints.https.address=:443' |
||||
- '--certificatesResolvers.letsencrypt.acme.email=you@localdns.xyz' |
||||
- '--certificatesResolvers.letsencrypt.acme.storage=acme.json' |
||||
- '--certificatesResolvers.letsencrypt.acme.httpChallenge.entryPoint=http' |
||||
- '--log=true' |
||||
- '--log.level=INFO' |
||||
logging: |
||||
driver: "json-file" |
||||
options: |
||||
max-size: "1m" |
||||
|
||||
drone: |
||||
container_name: drone |
||||
image: drone/drone:${DRONE_VERSION:-2.4} |
||||
restart: unless-stopped |
||||
depends_on: |
||||
gitea: |
||||
condition: service_started |
||||
environment: |
||||
# https://docs.drone.io/server/provider/gitea/ |
||||
- DRONE_DATABASE_DRIVER=sqlite3 |
||||
- DRONE_DATABASE_DATASOURCE=/data/database.sqlite |
||||
- DRONE_GITEA_SERVER=https://git.localdns.xyz/ |
||||
- DRONE_GIT_ALWAYS_AUTH=false |
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET} |
||||
- DRONE_SERVER_PROTO=https |
||||
- DRONE_SERVER_HOST=ci.localdns.xyz |
||||
- DRONE_TLS_AUTOCERT=false |
||||
- DRONE_USER_CREATE=${DRONE_USER_CREATE} |
||||
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID} |
||||
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET} |
||||
labels: |
||||
- "traefik.enable=true" |
||||
- "traefik.http.routers.drone.rule=Host(`ci.localdns.xyz`)" |
||||
- "traefik.http.routers.drone.entrypoints=https" |
||||
- "traefik.http.routers.drone.tls.certresolver=letsencrypt" |
||||
- "traefik.http.routers.drone.service=drone-service" |
||||
- "traefik.http.services.drone-service.loadbalancer.server.port=80" |
||||
networks: |
||||
- public |
||||
volumes: |
||||
- /var/run/docker.sock:/var/run/docker.sock |
||||
- ./drone:/data |
||||
|
||||
drone-runner: |
||||
container_name: drone-runner |
||||
image: drone/drone-runner-docker:${DRONE_RUNNER_VERSION:-1} |
||||
restart: unless-stopped |
||||
depends_on: |
||||
drone: |
||||
condition: service_started |
||||
environment: |
||||
# https://docs.drone.io/runner/docker/installation/linux/ |
||||
# https://docs.drone.io/server/metrics/ |
||||
- DRONE_RPC_PROTO=https |
||||
- DRONE_RPC_HOST=ci.localdns.xyz |
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET} |
||||
- DRONE_RUNNER_NAME="${HOSTNAME}-runner" |
||||
- DRONE_RUNNER_CAPACITY=2 |
||||
- DRONE_RUNNER_NETWORKS=public |
||||
- DRONE_DEBUG=false |
||||
- DRONE_TRACE=false |
||||
ports: |
||||
- "3002:3000" |
||||
networks: |
||||
- public |
||||
volumes: |
||||
- /var/run/docker.sock:/var/run/docker.sock |
||||
|
||||
networks: |
||||
public: |
||||
name: public |
Loading…
Reference in new issue