Port 3000 conflicts with Dokploy. Traefik routes traffic via Docker network, so expose is sufficient. Also remove env_file refs since Dokploy injects env vars directly.
32 lines
655 B
YAML
32 lines
655 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
expose:
|
|
- "8080"
|
|
environment:
|
|
- PORT=8080
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 5s
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
expose:
|
|
- "3000"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
environment:
|
|
- API_URL=http://backend:8080
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|