docs(compose): fix backend healthcheck path; remove frontend VITE_API_URL env and document /api proxy (refs #18)
This commit is contained in:
@@ -59,7 +59,8 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
|
# Backend exposes /health on internal port 3000
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -68,8 +69,8 @@ services:
|
|||||||
# Use pre-built image from GitHub Container Registry
|
# Use pre-built image from GitHub Container Registry
|
||||||
image: ghcr.io/the-luap/picpeak/frontend:latest
|
image: ghcr.io/the-luap/picpeak/frontend:latest
|
||||||
container_name: picpeak-frontend
|
container_name: picpeak-frontend
|
||||||
environment:
|
# Note: Pre-built frontend uses Nginx to proxy /api to backend:3001.
|
||||||
- VITE_API_URL=${FRONTEND_API_URL:-http://localhost:3001}
|
# Prefer keeping API base as '/api' in builds to avoid CORS.
|
||||||
ports:
|
ports:
|
||||||
- "${FRONTEND_PORT:-3000}:80"
|
- "${FRONTEND_PORT:-3000}:80"
|
||||||
networks:
|
networks:
|
||||||
@@ -110,4 +111,4 @@ volumes:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
picpeak-network:
|
picpeak-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user