vpn integration
This commit is contained in:
+41
-31
@@ -28,8 +28,6 @@ services:
|
||||
|
||||
# Port du container cible (le port d'écoute de Nginx à l’intérieur du conteneur)
|
||||
- "traefik.http.services.web.loadbalancer.server.port=80"
|
||||
ports:
|
||||
- "${LISTEN_PORT:-8000}:80"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- web
|
||||
@@ -37,15 +35,35 @@ services:
|
||||
depends_on:
|
||||
- app
|
||||
|
||||
gluetun:
|
||||
image: qmcgaw/gluetun
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
environment:
|
||||
- VPN_SERVICE_PROVIDER=protonvpn
|
||||
- VPN_TYPE=wireguard
|
||||
- WIREGUARD_PRIVATE_KEY=${PROTON_PKEY}
|
||||
- SERVER_COUNTRIES=${PROTON_COUNTRIES}
|
||||
- VPN_PORT_FORWARDING=on
|
||||
- VPN_PORT_FORWARDING_PROVIDER=protonvpn
|
||||
networks:
|
||||
- default
|
||||
volumes:
|
||||
- gluetun_data:/tmp/gluetun
|
||||
restart: unless-stopped
|
||||
|
||||
transmission:
|
||||
image: linuxserver/transmission
|
||||
network_mode: "service:gluetun"
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- PUID=${USER_ID}
|
||||
- PGID=${GROUP_ID}
|
||||
ports:
|
||||
- "51413:51413"
|
||||
- "51413:51413/udp"
|
||||
# ports:
|
||||
# - "51413:51413"
|
||||
# - "51413:51413/udp"
|
||||
volumes:
|
||||
- ./transmission/config:/config
|
||||
- ./transmission/downloads:/downloads
|
||||
@@ -53,38 +71,27 @@ services:
|
||||
|
||||
app:
|
||||
build:
|
||||
context: ./app
|
||||
dockerfile: "Dockerfile"
|
||||
args:
|
||||
puid: ${USER_ID}
|
||||
pgid: ${GROUP_ID}
|
||||
debug: ${DEBUG:-false}
|
||||
context: ./
|
||||
dockerfile: .docker/app/Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./app:/app
|
||||
- ./app:/oxpanel/app
|
||||
- ./transmission:/transmission:ro
|
||||
- /app/frontend/node_modules
|
||||
- gluetun_data:/tmp/gluetun:ro
|
||||
- /oxpanel/app/frontend/node_modules
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
- transmission
|
||||
- gluetun
|
||||
healthcheck:
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
command: >
|
||||
bash -c "sleep 10
|
||||
&& cd frontend && yarn build && cd ..
|
||||
&& python manage.py collectstatic --noinput
|
||||
&& python manage.py migrate
|
||||
&& uvicorn app.asgi:application --workers 3 --host 0.0.0.0 --port 8000 --lifespan off --loop uvloop --ws websockets --log-level info"
|
||||
|
||||
# celery:
|
||||
# extends:
|
||||
# service: app
|
||||
# restart: unless-stopped
|
||||
# depends_on:
|
||||
# - redis
|
||||
# - app
|
||||
# command: >
|
||||
# bash -c "sleep 5 & celery -A app worker -E -B"
|
||||
python manage.py migrate
|
||||
&& uvicorn app.asgi:application --config uvicorn_config.py"
|
||||
|
||||
event:
|
||||
extends:
|
||||
@@ -93,10 +100,13 @@ services:
|
||||
depends_on:
|
||||
- redis
|
||||
- app
|
||||
- transmission
|
||||
- gluetun
|
||||
command: >
|
||||
bash -c "sleep 15 & python manage.py torrent_event"
|
||||
bash -c "sleep 2 && python manage.py torrent_event"
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
gluetun_data:
|
||||
|
||||
Reference in New Issue
Block a user