108 lines
2.7 KiB
YAML
108 lines
2.7 KiB
YAML
version: "2"
|
|
|
|
networks:
|
|
webproxy:
|
|
external: true
|
|
|
|
backend-gitea:
|
|
external: true
|
|
|
|
services:
|
|
gitea:
|
|
image: gitea/gitea:1.12.5
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- DB_TYPE=mysql
|
|
- DB_HOST=db:3306
|
|
- DB_NAME=§{MYSQL_DATABASE}
|
|
- DB_USER=§{MYSQL_USER}
|
|
- DB_PASSWD=§{MYSQL_PASSWORD}
|
|
restart: always
|
|
networks:
|
|
- webproxy
|
|
- backend-gitea
|
|
volumes:
|
|
- /opt/appdata/gitea/data:/data
|
|
ports:
|
|
- "222:22"
|
|
container_name: bmen-gitea
|
|
depends_on:
|
|
- db
|
|
|
|
db:
|
|
image: mysql:5.7
|
|
restart: always
|
|
environment:
|
|
- MYSQL_RANDOM_ROOT_PASSWORD='1'
|
|
- MYSQL_USER=§{MYSQL_USER}
|
|
- MYSQL_PASSWORD=§{MYSQL_PASSWORD}
|
|
- MYSQL_DATABASE=§{MYSQL_DATABASE}
|
|
networks:
|
|
- backend-gitea
|
|
container_name: bmen-gitea-db
|
|
volumes:
|
|
- /opt/appdata/gitea/mysql:/var/lib/mysql
|
|
|
|
drone-server:
|
|
image: drone/drone:1.2.1
|
|
container_name: bmen-gitea-drone-server
|
|
ports:
|
|
- 8888:8888
|
|
- 9000
|
|
volumes:
|
|
- /opt/appdata/gitea/drone-server:/var/lib/drone/
|
|
restart: always
|
|
depends_on:
|
|
- gitea
|
|
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=:80
|
|
- 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_RPC_SECRET=§{DRONE_RPC_SECRET}
|
|
- DRONE_SERVER_HOST=0.0.0.0:8888
|
|
- DRONE_HOST=http://0.0.0.0:8888
|
|
- DRONE_SERVER_PROTO=http
|
|
- DRONE_TLS_AUTOCERT=false
|
|
- DRONE_AGENTS_ENABLED=true
|
|
networks:
|
|
- backend-gitea
|
|
|
|
drone-db:
|
|
image: postgres:alpine
|
|
container_name: drone-db
|
|
restart: always
|
|
volumes:
|
|
- /opt/appdata/gitea/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: bmen-gitea-drone-agent
|
|
command: agent
|
|
restart: always
|
|
depends_on:
|
|
- drone-server
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /opt/appdata/gitea/drone-agent:/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:
|
|
- backend-gitea |