60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
|
|
name: vdi-cloud-live
|
||
|
|
services:
|
||
|
|
postgres:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
restart: unless-stopped
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: vdi
|
||
|
|
POSTGRES_PASSWORD: ${VDI_DB_PASSWORD:?required}
|
||
|
|
POSTGRES_DB: vdi_live
|
||
|
|
volumes:
|
||
|
|
- vdi-live-postgres:/var/lib/postgresql/data
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U vdi -d vdi_live"]
|
||
|
|
interval: 3s
|
||
|
|
timeout: 3s
|
||
|
|
retries: 20
|
||
|
|
api:
|
||
|
|
image: vdi-cloud-live-api
|
||
|
|
build:
|
||
|
|
context: ..
|
||
|
|
dockerfile: platform/Dockerfile
|
||
|
|
restart: unless-stopped
|
||
|
|
init: true
|
||
|
|
extra_hosts:
|
||
|
|
- "${PVE_HOSTNAME:?required}:${PVE_HOST_IP:?required}"
|
||
|
|
environment:
|
||
|
|
VDI_MODE: production
|
||
|
|
VDI_LISTEN: 0.0.0.0:8080
|
||
|
|
VDI_JWT_SECRET: ${VDI_JWT_SECRET:?required}
|
||
|
|
VDI_ADMIN_USERNAME: ${VDI_ADMIN_USERNAME:?required}
|
||
|
|
VDI_ADMIN_PASSWORD: ${VDI_ADMIN_PASSWORD:?required}
|
||
|
|
DATABASE_URL: postgres://vdi:${VDI_DB_PASSWORD}@postgres:5432/vdi_live?sslmode=disable
|
||
|
|
PVE_URL: ${PVE_URL:?required}
|
||
|
|
PVE_TOKEN_ID: ${PVE_TOKEN_ID:?required}
|
||
|
|
PVE_TOKEN_SECRET: ${PVE_TOKEN_SECRET:?required}
|
||
|
|
PVE_CA_FILE: /run/secrets/pve-ca.pem
|
||
|
|
volumes:
|
||
|
|
- ../.local/live/pve-ca.pem:/run/secrets/pve-ca.pem:ro
|
||
|
|
depends_on:
|
||
|
|
postgres:
|
||
|
|
condition: service_healthy
|
||
|
|
console:
|
||
|
|
image: vdi-cloud-live-console
|
||
|
|
build:
|
||
|
|
context: ..
|
||
|
|
dockerfile: console/Dockerfile
|
||
|
|
args:
|
||
|
|
VITE_DEMO_HINT: "false"
|
||
|
|
restart: unless-stopped
|
||
|
|
ports:
|
||
|
|
- "127.0.0.1:${VDI_LIVE_CONSOLE_PORT:-5182}:80"
|
||
|
|
- "${VDI_LIVE_BIND_IP:?required}:${VDI_LIVE_HTTPS_PORT:-8443}:443"
|
||
|
|
volumes:
|
||
|
|
- ./nginx.live.conf:/etc/nginx/conf.d/default.conf:ro
|
||
|
|
- ../.local/live/tls:/run/secrets/tls:ro
|
||
|
|
depends_on:
|
||
|
|
- api
|
||
|
|
volumes:
|
||
|
|
vdi-live-postgres:
|