37 lines
843 B
YAML
37 lines
843 B
YAML
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
container_name: vpn-panel-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-vpnpanel}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
|
POSTGRES_DB: ${POSTGRES_DB:-vpnpanel}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vpnpanel} -d ${POSTGRES_DB:-vpnpanel}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
panel:
|
|
build: .
|
|
container_name: vpn-panel-app
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "${APP_PORT:-8080}:8080"
|
|
environment:
|
|
APP_PORT: "8080"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
command: ["/app/panel"]
|
|
|
|
volumes:
|
|
pgdata:
|