Skip to content

Instantly share code, notes, and snippets.

@Bouni
Created April 28, 2022 14:56
Show Gist options
  • Save Bouni/9819276ec473acea062cd008c8432749 to your computer and use it in GitHub Desktop.
Save Bouni/9819276ec473acea062cd008c8432749 to your computer and use it in GitHub Desktop.
Gitea + Drone CI docker-compose setup, not production ready, just for testing
gitea:
image: gitea/gitea:1.16.4
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=giteadb:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
- GITEA__server__DOMAIN=gitea.bouni.de
- GITEA__server__HTTP_PORT=3456
restart: always
volumes:
- ./gitea/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3456:3456"
- "2200:22"
depends_on:
- giteadb
giteadb:
container_name: giteadb
image: postgres:13
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
volumes:
- ./gitea/postgres:/var/lib/postgresql/data
# https://github.com/harness/drone/blob/master/docker/compose/drone-gitea/docker-compose.yml
drone-server:
image: drone/drone
container_name: drone-server
ports:
- 8456:80
volumes:
- ./drone:/data
restart: always
depends_on:
- gitea
environment:
- DRONE_SERVER_HOST=gitea.bouni.de:8456
- DRONE_SERVER_PROTO=http
- DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6
- DRONE_COOKIE_SECRET=e8206356c843d81e05ab6735e7ebf075
- DRONE_COOKIE_TIMEOUT=720h
- DRONE_GITEA_CLIENT_ID=87f81563-2265-4d67-8eb9-0e236ade69bb
- DRONE_GITEA_CLIENT_SECRET=4l5AIuLh7yJmSxtj19TP6fnOdE7tueNcEhLhDPwTopfD
- DRONE_GITEA_SERVER=http://gitea.bouni.de:3456
- DRONE_LOGS_DEBUG=true
- DRONE_CRON_DISABLED=true
- DRONE_TLS_AUTOCERT=false
- DRONE_DEBUG=true
drone-runner:
image: drone/drone-runner-docker:latest
environment:
- DRONE_RPC_HOST=gitea.bouni.de:8456
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=drone-runner
- DRONE_RPC_PROTO=http
- DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment