Add PostgreSQL, user/squad management, remove private domains from docs

This commit is contained in:
tgvpn
2026-05-21 01:13:23 +03:00
parent d0dc8d5822
commit 5e3229e998
17 changed files with 1171 additions and 58 deletions
+23 -2
View File
@@ -1,4 +1,20 @@
services:
db:
image: postgres:16-alpine
container_name: tgvpn-db
restart: unless-stopped
environment:
POSTGRES_USER: tgvpn
POSTGRES_PASSWORD: tgvpn
POSTGRES_DB: tgvpn
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tgvpn -d tgvpn"]
interval: 5s
timeout: 5s
retries: 5
bot:
build:
context: .
@@ -6,9 +22,14 @@ services:
image: tgvpn-bot:latest
container_name: tgvpn-bot
restart: unless-stopped
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
BOT_DEBUG: ${BOT_DEBUG:-false}
# Long polling — исходящие HTTPS к api.telegram.org
# ports не нужны, пока нет webhook
DATABASE_URL: postgres://tgvpn:tgvpn@db:5432/tgvpn?sslmode=disable
volumes:
pgdata: