service-drone-runner/docker-compose.yml

89 lines
2.3 KiB
YAML
Raw Normal View History

2022-08-18 18:29:48 +00:00
---
version: '3.6'
# References
# * https://www.alexhyett.com/drone-ci-raspberry-pi
services:
# gitea:
# container_name: gitea
# image: gitea/gitea:${GITEA_VERSION:-1.10.6}
# restart: unless-stopped
# environment:
# # https://docs.gitea.io/en-us/install-with-docker/#environments-variables
# - APP_NAME="Gitea"
# - USER_UID=1000
# - USER_GID=1000
# - RUN_MODE=prod
# - DOMAIN=${IP_ADDRESS}
# - SSH_DOMAIN=${IP_ADDRESS}
# - HTTP_PORT=3000
# - ROOT_URL=http://${IP_ADDRESS}:3000
# - SSH_PORT=222
# - SSH_LISTEN_PORT=22
# - DB_TYPE=sqlite3
# ports:
# - "3000:3000"
# - "222:22"
# networks:
# - cicd_net
# volumes:
# - ./gitea:/data
drone:
container_name: drone
image: "drone/drone:${DRONE_VERSION:-2.12.1}"
restart: unless-stopped
depends_on: []
environment:
# https://docs.drone.io/server/provider/gitea/
- DRONE_DATABASE_DRIVER=sqlite3
- DRONE_DATABASE_DATASOURCE=/data/database.sqlite
- DRONE_GIT_ALWAYS_AUTH="false"
- DRONE_RPC_SECRET="${DRONE_RPC_SECRET}"
- DRONE_SERVER_PROTO=http
- DRONE_SERVER_HOST="${IP_ADDRESS}:3001"
- DRONE_TLS_AUTOCERT="false"
- DRONE_USER_CREATE="${DRONE_USER_CREATE}"
# DRONE_GITEA_SERVER: "http://${IP_ADDRESS}:3000/"
# DRONE_GITEA_CLIENT_ID: "${DRONE_GITEA_CLIENT_ID}"
# DRONE_GITEA_CLIENT_SECRET: "${DRONE_GITEA_CLIENT_SECRET}"
ports:
- "3001:80"
- "9001:9000"
networks:
- cicd_net
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.8.2}
restart: unless-stopped
depends_on:
- drone
environment:
# https://docs.drone.io/runner/docker/installation/linux/
# https://docs.drone.io/server/metrics/
DRONE_RPC_PROTO: http
DRONE_RPC_HOST: drone
DRONE_RPC_SECRET: "${DRONE_RPC_SECRET}"
# DRONE_RUNNER_NAME: "${HOSTNAME}-runner"
DRONE_RUNNER_CAPACITY: 2
DRONE_RUNNER_NETWORKS: cicd_net
DRONE_DEBUG: "false"
DRONE_TRACE: "false"
ports:
- "3002:3000"
networks:
- cicd_net
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
cicd_net:
name: cicd_net
#