Compare commits

...

5 Commits

3 changed files with 20 additions and 3 deletions

View File

@ -1,7 +1,7 @@
FROM python:3.12-slim-bookworm
# The installer requires curl (and certificates) to download the release archive
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates nano
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates nano wireguard iproute2 iputils-ping curl
# Download the latest installer
ADD https://astral.sh/uv/install.sh /uv-installer.sh
@ -26,4 +26,4 @@ EXPOSE 5205
# Presuming there is a `my_app` command provided by the project uvicorn main:app --reload
CMD ["uv", "run", "main.py"]
CMD ["bash", "-c", "wg-quick up /app/wireguard/wg0.conf && uv run main.py"]

View File

@ -25,4 +25,6 @@ services:
- .:/app
environment:
- FLASK_DEBUG=1 # Дополнительная страховка для включения дебага
- PYTHONUNBUFFERED=1 # Чтобы логи выводились сразу, а не кэшировались
- PYTHONUNBUFFERED=1 # Чтобы логи выводились сразу, а не кэшировались

15
wireguard/wg0.conf Normal file
View File

@ -0,0 +1,15 @@
[Interface]
PrivateKey = yNlGhRShhVe9Jf+9PYA5cL1OcQq2K2rT8KsPGPfG50o=
Address = 10.66.66.15/32,fd42:42:42::15/128
DNS = 1.1.1.1,1.0.0.1
# Uncomment the next line to set a custom MTU
# This might impact performance, so use it only if you know what you are doing
# See https://github.com/nitred/nr-wg-mtu-finder to find your optimal MTU
# MTU = 1420
[Peer]
PublicKey = bcJDrYlhWls25zz9+bJcWiONw8Qfx1tai504+vKLcgQ=
PresharedKey = 40DSkC0TTySjBFyUj19++ngCdYxAHZaLnsrz8Ck9R2Q=
Endpoint = 85.208.110.167:50395
AllowedIPs = 0.0.0.0/0,::/0