Add Pangolin Compose Stack
This commit is contained in:
66
docker-compose.yml
Normal file
66
docker-compose.yml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: pangolin
|
||||||
|
|
||||||
|
services:
|
||||||
|
pangolin:
|
||||||
|
image: fosrl/pangolin:1.3.0
|
||||||
|
container_name: pangolin
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:3001/api/v1/"]
|
||||||
|
interval: "3s"
|
||||||
|
timeout: "3s"
|
||||||
|
retries: 15
|
||||||
|
volumes:
|
||||||
|
- data:/app/config
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
|
gerbil:
|
||||||
|
image: fosrl/gerbil:1.0.0
|
||||||
|
container_name: gerbil
|
||||||
|
depends_on:
|
||||||
|
pangolin:
|
||||||
|
condition: service_healthy
|
||||||
|
command:
|
||||||
|
- --reachableAt=http://gerbil:3003
|
||||||
|
- --generateAndSaveKeyTo=/var/config/key
|
||||||
|
- --remoteConfig=http://pangolin:3001/api/v1/gerbil/get-config
|
||||||
|
- --reportBandwidthTo=http://pangolin:3001/api/v1/gerbil/receive-bandwidth
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- SYS_MODULE
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- data/:/var/config
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 443:443
|
||||||
|
- 51820:51820/udp
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
|
traefik:
|
||||||
|
image: traefik:v3.3.3
|
||||||
|
container_name: traefik
|
||||||
|
depends_on:
|
||||||
|
pangolin:
|
||||||
|
condition: service_healthy
|
||||||
|
command:
|
||||||
|
- --configFile=/etc/traefik/traefik_config.yml
|
||||||
|
restart: unless-stopped
|
||||||
|
network_mode: service:gerbil # Ports appear on the gerbil service
|
||||||
|
volumes:
|
||||||
|
- letsencrypt:/letsencrypt
|
||||||
|
- /srv/pangolin/traefik:/etc/traefik:ro
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data:
|
||||||
|
name: pangolin_data
|
||||||
|
letsencrypt:
|
||||||
|
name: pangolin_letsencrypt
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal:
|
||||||
|
name: pangolin_internal
|
13
update.sh
Normal file
13
update.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
local_head=$(git rev-parse HEAD)
|
||||||
|
upstream_ref=$(git rev-parse --abbrev-ref @{u} | sed 's/\// /')
|
||||||
|
remote_head=$(git ls-remote $upstream_ref | cut -f1)
|
||||||
|
|
||||||
|
if [[ $local_head != $remote_head ]]; then
|
||||||
|
git pull
|
||||||
|
docker compose pull
|
||||||
|
docker compose up -d
|
||||||
|
fi
|
Reference in New Issue
Block a user