Skip to content

Instantly share code, notes, and snippets.

@cbirkenbeul
Created January 9, 2020 12:47
Show Gist options
  • Save cbirkenbeul/eda78109ecd6b243135a3158cff37b97 to your computer and use it in GitHub Desktop.
Save cbirkenbeul/eda78109ecd6b243135a3158cff37b97 to your computer and use it in GitHub Desktop.
---
version: "2"
services:
gitea-app:
image: gitea/gitea:latest
container_name: gitea-app
environment:
- USER_UID=1000
- USER_GID=1000
- DB_TYPE=mysql
- DB_HOST=db:3306
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=dbpass
restart: always
volumes:
- $PWD/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
depends_on:
- gitea-db
gitea-db:
image: mysql:5.7
container_name: gitea-db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=rootpass
- MYSQL_USER=gitea
- MYSQL_PASSWORD=dbpass
- MYSQL_DATABASE=gitea
volumes:
- $PWD/mysql:/var/lib/mysql
drone:
image: drone/drone:1
container_name: drone-server
restart: always
volumes:
- $PWD/drone:/data
environment:
- DRONE_AGENT_ENABLED=true
- DRONE_GITEA_SERVER=https://git.domain.com
- DRONE_GITEA_CLIENT_ID=clientid
- DRONE_GITEA_CLIENT_SECRET=secret
- DRONE_RPC_SECRET=rpc
- DRONE_SERVER_HOST=drone.domain.com
- DRONE_SERVER_PROTO=https
ports:
- "8084:80"
- "8444:443"
depends_on:
- gitea-app
drone-runner:
image: drone/drone-runner-docker:1
container_name: drone-runner
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_RPC_PROTO=https
- DRONE_RPC_HOST=drone.domain.com
- DRONE_RPC_SECRET=secret
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=${HOSTNAME}
ports:
- "3001:3000"
depends_on:
- drone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment