Add Go VPN admin panel with Docker Compose and Postgres 17.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
orohi
2026-07-29 03:47:42 +03:00
co-authored by Cursor
parent 23101e355c
commit b1e31430b5
17 changed files with 1229 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: vpn-panel
restart: unless-stopped
ports:
- "${APP_PORT:-8080}:8080"
env_file:
- .env
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable
POSTGRES_HOST: postgres
depends_on:
postgres:
condition: service_healthy
networks:
- vpn-net
postgres:
image: postgres:17-alpine
container_name: vpn-panel-db
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
networks:
- vpn-net
volumes:
postgres_data:
networks:
vpn-net:
driver: bridge