Improve docker-compose for Dokploy env vars
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+38
-4
@@ -8,32 +8,66 @@ services:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-vpn_panel}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- vpn_net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vpn} -d ${POSTGRES_DB:-vpn_panel}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
panel:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "${PANEL_PORT:-8000}:8000"
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
APP_NAME: ${APP_NAME:-VpnPanel}
|
||||
SECRET_KEY: ${SECRET_KEY:-change-me-to-a-long-random-string}
|
||||
DEBUG: ${DEBUG:-false}
|
||||
SESSION_HTTPS_ONLY: ${SESSION_HTTPS_ONLY:-false}
|
||||
|
||||
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-change-me-strong-password}
|
||||
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@example.com}
|
||||
|
||||
POSTGRES_USER: ${POSTGRES_USER:-vpn}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-vpn}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-vpn_panel}
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-vpn}:${POSTGRES_PASSWORD:-vpn}@postgres:5432/${POSTGRES_DB:-vpn_panel}
|
||||
|
||||
PUBLIC_HOST: ${PUBLIC_HOST:-127.0.0.1}
|
||||
PUBLIC_PORT: ${PUBLIC_PORT:-51820}
|
||||
AWG_PUBLIC_PORT: ${AWG_PUBLIC_PORT:-51821}
|
||||
|
||||
WG_INTERFACE: ${WG_INTERFACE:-wg0}
|
||||
AWG_INTERFACE: ${AWG_INTERFACE:-awg0}
|
||||
WG_SUBNET: ${WG_SUBNET:-10.8.0.0/24}
|
||||
AWG_SUBNET: ${AWG_SUBNET:-10.9.0.0/24}
|
||||
WG_DNS: ${WG_DNS:-1.1.1.1}
|
||||
|
||||
WG_CONFIG_DIR: /data/wireguard
|
||||
AWG_CONFIG_DIR: /data/amneziawg
|
||||
volumes:
|
||||
- wg_data:/data/wireguard
|
||||
- awg_data:/data/amneziawg
|
||||
networks:
|
||||
- vpn_net
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/health"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
networks:
|
||||
vpn_net:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user