Compare commits
9 Commits
master
...
woodpecker
Author | SHA1 | Date |
---|---|---|
Jef Roosens | 12c1aad4f4 | |
Jef Roosens | c3ea9a0b25 | |
Jef Roosens | 0d8408f446 | |
Jef Roosens | d554373c5d | |
Jef Roosens | 02983c665d | |
Jef Roosens | 290fa36051 | |
Jef Roosens | 2e27fb0239 | |
Jef Roosens | bc6ae2bea8 | |
Jef Roosens | e0391bc861 |
|
@ -63,3 +63,9 @@ GITEA_HOST=gitea_app_1
|
||||||
PODGRAB_DOMAIN=
|
PODGRAB_DOMAIN=
|
||||||
### Hostname
|
### Hostname
|
||||||
PODGRAB_HOST=podgrab_app_1
|
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:
|
Reference in New Issue