The runtime cp from etsy-tracker to a shared volume silently failed because the nodejs user lacked write permissions on the root-owned volume. Now a dedicated nginx-frontend Docker stage is built and pushed to GHCR with the React client baked in, eliminating the volume-sharing approach. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
No EOL
1.2 KiB
YAML
51 lines
No EOL
1.2 KiB
YAML
services:
|
|
# Nginx reverse proxy and static file server (client baked into image)
|
|
nginx:
|
|
image: ghcr.io/dlawler489/etsy-finance-tracker-nginx:main
|
|
container_name: etsy-nginx
|
|
ports:
|
|
- "3000:80"
|
|
depends_on:
|
|
- etsy-tracker
|
|
restart: unless-stopped
|
|
networks:
|
|
- etsy-network
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# Etsy Finance Tracker API Server (from GitHub Container Registry)
|
|
etsy-tracker:
|
|
image: ghcr.io/dlawler489/etsy-finance-tracker:main
|
|
container_name: etsy-finance-tracker
|
|
expose:
|
|
- "8080"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=8080
|
|
- CLIENT_URL=http://nginx
|
|
volumes:
|
|
- etsy_data:/app/data
|
|
- etsy_uploads:/app/uploads
|
|
restart: unless-stopped
|
|
networks:
|
|
- etsy-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
etsy_uploads:
|
|
driver: local
|
|
etsy_data:
|
|
driver: local
|
|
|
|
networks:
|
|
etsy-network:
|
|
driver: bridge |