This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
4 changed files with
111 additions and
0 deletions
|
|
|
@ -63,3 +63,9 @@ GITEA_HOST=gitea_app_1
|
|
|
|
|
PODGRAB_DOMAIN=
|
|
|
|
|
### Hostname
|
|
|
|
|
PODGRAB_HOST=podgrab_app_1
|
|
|
|
|
|
|
|
|
|
## Woodpecker
|
|
|
|
|
### Domain name
|
|
|
|
|
WOODPECKER_DOMAIN=
|
|
|
|
|
### Hostname
|
|
|
|
|
WOODPECKER_HOST=woodpecker_app_1
|
|
|
|
|
|
|
|
@ -0,0 +1,22 @@
|
|
|
|
|
server {
|
|
|
|
|
# SSL Key locations
|
|
|
|
|
ssl_certificate /etc/letsencrypt/live/${WOODPECKER_DOMAIN}/fullchain.pem;
|
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/${WOODPECKER_DOMAIN}/privkey.pem;
|
|
|
|
|
|
|
|
|
|
listen ${HTTPS_PORT} ssl;
|
|
|
|
|
listen [::]:${HTTPS_PORT} ssl;
|
|
|
|
|
server_name ${WOODPECKER_DOMAIN};
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
|
|
|
|
|
|
proxy_pass http://${WOODPECKER_HOST}:8000;
|
|
|
|
|
proxy_redirect off;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
|
|
chunked_transfer_encoding off;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -0,0 +1,16 @@
|
|
|
|
|
# Allow all users to use it
|
|
|
|
|
DRONE_OPEN=true
|
|
|
|
|
# Drone needs to know its own location
|
|
|
|
|
DRONE_HOST=
|
|
|
|
|
# The same, but without the https in front of it
|
|
|
|
|
DRONE_SERVER=
|
|
|
|
|
# Shared secret to communicate with agents
|
|
|
|
|
DRONE_SECRET=
|
|
|
|
|
|
|
|
|
|
# Tell Drone to use postgres
|
|
|
|
|
DRONE_DATABASE_DRIVER=postgres
|
|
|
|
|
DRONE_DATABASE_DATASOURCE=postgres://woodpecker:woodpecker@db:5432/woodpecker?sslmode=disable
|
|
|
|
|
|
|
|
|
|
# These are just a guess based on the documentation
|
|
|
|
|
DRONE_GITEA=true
|
|
|
|
|
DRONE_GITEA_URL=
|
|
|
|
@ -0,0 +1,67 @@
|
|
|
|
|
version: '2.4'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
# The main drone instance
|
|
|
|
|
app:
|
|
|
|
|
# Latest version as of writing this document
|
|
|
|
|
image: 'laszlocloud/woodpecker-server:v0.13.0'
|
|
|
|
|
restart: 'always'
|
|
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: 'service_healthy'
|
|
|
|
|
|
|
|
|
|
env_file:
|
|
|
|
|
- '.env'
|
|
|
|
|
networks:
|
|
|
|
|
- 'default'
|
|
|
|
|
- 'nginx'
|
|
|
|
|
ports:
|
|
|
|
|
# Used to communicate with the agents (I think)
|
|
|
|
|
- '9000:9000'
|
|
|
|
|
volumes:
|
|
|
|
|
- 'server-data:/var/lib/drone'
|
|
|
|
|
|
|
|
|
|
# Database for the server
|
|
|
|
|
db:
|
|
|
|
|
image: 'postgres:13.2-alpine'
|
|
|
|
|
restart: 'always'
|
|
|
|
|
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: 'pg_isready -U woodpecker'
|
|
|
|
|
interval: '30s'
|
|
|
|
|
timeout: '5s'
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: '0s'
|
|
|
|
|
|
|
|
|
|
environment:
|
|
|
|
|
- 'POSTGRES_DB=woodpecker'
|
|
|
|
|
- 'POSTGRES_USER=woodpecker'
|
|
|
|
|
- 'POSTGRES_PASSWORD=woodpecker'
|
|
|
|
|
volumes:
|
|
|
|
|
- 'db-data:/var/lib/postgresql/data'
|
|
|
|
|
|
|
|
|
|
# We can deploy more agents by using the scale command
|
|
|
|
|
# Each agent can do one parallel build by default
|
|
|
|
|
agent:
|
|
|
|
|
image: 'laszlocloud/woodpecker-agent:v0.13.0'
|
|
|
|
|
restart: 'always'
|
|
|
|
|
command: 'agent'
|
|
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
|
app:
|
|
|
|
|
condition: 'service_started'
|
|
|
|
|
|
|
|
|
|
environment:
|
|
|
|
|
- 'DRONE_SERVER=${DRONE_SERVER}'
|
|
|
|
|
- 'DRONE_SECRET=${DRONE_SECRET}'
|
|
|
|
|
volumes:
|
|
|
|
|
- '/var/run/docker.sock:/var/run/docker.sock'
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
nginx:
|
|
|
|
|
external: true
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
db-data:
|
|
|
|
|
server-data:
|