feat: woodpecker
This commit is contained in:
parent
e67e416b4d
commit
58ba2ad8df
4
woodpecker/.env
Normal file
4
woodpecker/.env
Normal file
@ -0,0 +1,4 @@
|
||||
BASE_URL=build.
|
||||
EMAIL=
|
||||
|
||||
WOODPECKER_AGENT_SECRET= #$(openssl rand -hex 32)
|
55
woodpecker/compose.yaml
Normal file
55
woodpecker/compose.yaml
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
services:
|
||||
install_site:
|
||||
build: install_site
|
||||
environment:
|
||||
- BASE_URL
|
||||
- EMAIL
|
||||
volumes:
|
||||
- ./nginx.conf:/web/woodpecker.conf
|
||||
- sites:/sites/
|
||||
- certs:/etc/letsencrypt/
|
||||
- certbotroot:/var/www/certbot/
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
server:
|
||||
image: docker.io/woodpeckerci/woodpecker-server:v2.0.0
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- server-data:/var/lib/woodpecker/
|
||||
environment:
|
||||
- WOODPECKER_OPEN=true
|
||||
- WOODPECKER_HOST=$BASE_URL
|
||||
- WOODPECKER_GITEA=true
|
||||
- WOODPECKER_AGENT_SECRET
|
||||
networks:
|
||||
- nginx
|
||||
- default
|
||||
|
||||
agent:
|
||||
image: docker.io/woodpeckerci/woodpecker-agent:v2.0.0
|
||||
restart: unless-stopped
|
||||
command: agent
|
||||
volumes:
|
||||
- agent-config:/etc/woodpecker
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- WOODPECKER_SERVER=server:9000
|
||||
- WOODPECKER_AGENT_SECRET
|
||||
depends_on:
|
||||
- server
|
||||
|
||||
|
||||
volumes:
|
||||
server-data:
|
||||
agent-config:
|
||||
sites:
|
||||
external: true
|
||||
certs:
|
||||
external: true
|
||||
certbotroot:
|
||||
external: true
|
||||
|
||||
networks:
|
||||
nginx:
|
||||
external: true
|
1
woodpecker/install_site
Symbolic link
1
woodpecker/install_site
Symbolic link
@ -0,0 +1 @@
|
||||
../_nginx/install_site
|
28
woodpecker/nginx.conf
Normal file
28
woodpecker/nginx.conf
Normal file
@ -0,0 +1,28 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name $BASE_URL;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name $BASE_URL;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://woodpecker:8000;
|
||||
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
chunked_transfer_encoding off;
|
||||
proxy_buffering off;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user