Initial import

This commit is contained in:
Glenn Y. Rolland 2022-08-18 17:31:05 +02:00
commit 473a527f1a
3 changed files with 102 additions and 0 deletions

0
Dockerfile Normal file
View file

14
README.md Normal file
View file

@ -0,0 +1,14 @@
## Setup on Dokku
dokku apps:create cicd
dokku config:set cicd DRONE_DATABASE_DRIVER=sqlite3
dokku config:set cicd DRONE_DATABASE_DATASOURCE=/data/database.sqlite
dokku config:set cicd DRONE_GIT_ALWAYS_AUTH="false"
dokku config:set cicd DRONE_RPC_SECRET=mFJCcUmWVictjhAug9rXc7bJxV4LsWrjR99jTvrwe9pR3ksK
dokku config:set cicd DRONE_SERVER_PROTO=http
dokku config:set cicd DRONE_TLS_AUTOCERT=false
dokku config:set cicd DRONE_SERVER_HOST=localhost:3001
git remote add dokku dokku@dinlas.apps.glenux.net:cicd
git push

88
docker-compose.yml Normal file
View file

@ -0,0 +1,88 @@
---
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
#