- Install curl in Alpine image for health checks - Add ARG and ENV declarations for NEXT_PUBLIC_* variables in builder stage - Pass build args from docker-compose.yml to Dockerfile - Update health checks to use curl instead of node -e - Update .env.example with helpful comments for Docker vs local dev 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
pastel-ui:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:3001}
|
|
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
|
|
image: ghcr.io/valknarness/pastel-ui:latest
|
|
container_name: pastel-ui
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:3001}
|
|
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
pastel-api:
|
|
image: ghcr.io/valknarness/pastel-api:latest
|
|
container_name: pastel-api
|
|
ports:
|
|
- "3001:3001"
|
|
environment:
|
|
- RUST_LOG=info
|
|
- PORT=3001
|
|
- HOST=0.0.0.0
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3001/api/v1/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
networks:
|
|
default:
|
|
name: pastel-network
|