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 install: build: . profiles: ["tools"] stdin_open: true tty: true working_dir: /work volumes: - .:/work entrypoint: ["/app/install"] depends_on: postgres: condition: service_healthy panel: build: . container_name: vpn-panel-app restart: unless-stopped ports: - "${APP_PORT:-8080}:8080" environment: APP_PORT: "8080" APP_DOMAIN: ${APP_DOMAIN:-localhost} DATABASE_URL: ${DATABASE_URL:-postgres://vpnpanel:changeme@postgres:5432/vpnpanel?sslmode=disable} SECRET_KEY: ${SECRET_KEY:-change-me-run-install-first} INSTALLED: ${INSTALLED:-false} depends_on: postgres: condition: service_healthy command: ["/app/panel"] volumes: pgdata: