Files
demo-portfolio-site/docker-compose.yml
johnhkchen 583368566a Remove portfolio network for Coolify compatibility
- Remove custom 'portfolio' network definition
- Coolify creates its own network per deployment
- Having both networks causes Traefik routing conflicts
- Containers were connecting to wrong network IP

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:11:18 -07:00

53 lines
1.2 KiB
YAML

# Demo: Portfolio Site
# Astro + Hono frontend and API consuming shared Directus infrastructure
services:
# Hono API Backend
api:
build:
context: ./api
dockerfile: Dockerfile
restart: unless-stopped
environment:
# Connect to external Directus infrastructure
DIRECTUS_URL: ${DIRECTUS_URL}
PORT: 3000
expose:
- "3000"
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://127.0.0.1:3000/health', (r) => r.statusCode === 200 ? process.exit(0) : process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Astro Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
api:
condition: service_healthy
environment:
# Internal API URL (within Docker network)
API_URL: http://api:3000
# Public API URL (for browser requests)
PUBLIC_API_URL: ${PUBLIC_API_URL}
expose:
- "4321"
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://127.0.0.1:4321/', (r) => r.statusCode === 200 ? process.exit(0) : process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s