-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (65 loc) · 2.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (65 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Local stack aligned with Cloudflare container images.
# Run: docker compose up -d --build
#
# Environment files (container runtime):
# - Base secrets/config: .env.prod (default)
# - Optional overrides: set ENV_FILE_EXTRA to a path like backend/.env.debug
# Example: ENV_FILE_EXTRA=backend/.env.debug docker compose up -d --build
# Or use the small compose env file (sets ENV_FILE_EXTRA for you):
# docker compose --env-file backend/.env.compose-debug up -d --build
#
# Note: docker compose --env-file only loads variables for Compose interpolation;
# it does not automatically inject into containers unless referenced here.
name: cvlator-local
services:
pdf-service:
build:
context: ./backend
dockerfile: Dockerfile.pdf-service
env_file:
- ${ENV_FILE:-.env.prod}
- ${ENV_FILE_EXTRA:-backend/.env.empty}
environment:
PDF_SERVICE_AUTH_HEADER: X-PDF-Service-Token
ports:
- "8001:8001"
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile.wrangler
env_file:
- ${ENV_FILE:-.env.prod}
- ${ENV_FILE_EXTRA:-backend/.env.empty}
environment:
USE_PDF_SERVICE: "true"
PDF_SERVICE_URL: http://pdf-service:8001
PDF_SERVICE_AUTH_HEADER: X-PDF-Service-Token
ports:
- "8000:8000"
volumes:
- ./uploads:/app/uploads
depends_on:
- pdf-service
restart: unless-stopped
frontend:
build: ./frontend
env_file:
- ${ENV_FILE:-.env.prod}
- ${ENV_FILE_EXTRA:-backend/.env.empty}
ports:
- "3000:3000"
environment:
- CV_DOCKER_FRONTEND=1
- VITE_API_BASE_URL=/api
- VITE_API_PROXY_TARGET=http://backend:8000
- NPM_CONFIG_INCLUDE_OPTIONAL=true
volumes:
- ./frontend:/app
- /app/node_modules
# Clear Vite optimize-deps dir on each boot: the anonymous node_modules volume
# otherwise keeps stale .vite/metadata vs chunk filenames (404 + "file does not exist").
command: >-
sh -c "npm install --include=optional &&
rm -rf node_modules/.vite &&
exec npm run dev -- --host 0.0.0.0 --port 3000 --force"