41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
# =====================================
|
|
# Production Docker Compose — dpage-editor
|
|
# =====================================
|
|
# Vite SPA (static) served by nginx on port 80
|
|
# Build context: repository root (parent of this file)
|
|
# =====================================
|
|
|
|
services:
|
|
|
|
app:
|
|
build:
|
|
context: ..
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- VITE_API_URL=${VITE_API_URL}
|
|
- VITE_TOKEN_NAME=${VITE_TOKEN_NAME:-dpage-editor-t}
|
|
- VITE_REFRESH_TOKEN_NAME=${VITE_REFRESH_TOKEN_NAME:-dpage-editor-refresh-t}
|
|
container_name: ${SERVICE_NAME:-dpage-editor}-${ENVIRONMENT:-prod}
|
|
image: ${IMAGE_REPO:-ghcr.io/zmihamid/dpage-editor}:${TAG:-latest}
|
|
ports:
|
|
- "${APP_PORT_EXTERNAL:-8080}:80"
|
|
restart: on-failure:3
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "test -s /usr/share/nginx/html/index.html"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "5"
|
|
networks:
|
|
- app-network
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|
|
name: ${NETWORK_NAME:-dpage-editor-network}
|