wstkeys/docker-compose.yml

44 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/certbot/www:/var/www/certbot
- ./nginx/certbot/conf:/etc/letsencrypt
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always
wg-client:
image: ghcr.io/linuxserver/wireguard
container_name: wg-client
cap_add:
- NET_ADMIN
- SYS_MODULE
volumes:
- ./wg0.conf:/etc/wireguard/wg0.conf
networks:
- wg-net
restart: always
web:
build: .
container_name: flask-dev
ports:
- "5205:5205" # Пробрасываем порт наружу
volumes:
# Главная строка: монтируем текущую папку с кодом (.)
# в папку /app внутри контейнера
- .:/app
environment:
- FLASK_DEBUG=1 # Дополнительная страховка для включения дебага
- PYTHONUNBUFFERED=1 # Чтобы логи выводились сразу, а не кэшировались
network_mode: "service:wg-client" # ← весь трафик Flask идёт через WireGuard
depends_on:
- wg-client
restart: always