-
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) · 1.84 KB
/
docker-compose.yml
File metadata and controls
68 lines (65 loc) · 1.84 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
services:
# Development Frontend - Updated for React 19
frontend:
build:
context: .
dockerfile: Dockerfile.dev
container_name: promata-frontend
environment:
- NODE_ENV=development
- VITE_API_URL=${VITE_API_URL:-http://localhost:8080/api}
- VITE_APP_ENV=${VITE_APP_ENV:-development}
- VITE_APP_VERSION=${VITE_APP_VERSION:-local}
- CHOKIDAR_USEPOLLING=true
ports:
- "${FRONTEND_DEV_PORT_MAPPING:-3000:3000}"
volumes:
- .:/app
- frontend_node_modules:/app/node_modules
- frontend_vite_cache:/app/.vite
- frontend_cache:/app/.cache
networks:
- promata_dev
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# Production Frontend - Updated for React 19 + Vite 6
frontend-prod:
build:
context: .
dockerfile: Dockerfile.prod
args:
BUILD_DATE: ${BUILD_DATE:-$(date -u +'%Y-%m-%dT%H:%M:%SZ')}
VCS_REF: ${VCS_REF:-local}
VERSION: ${VERSION:-local}
VITE_API_URL: ${VITE_API_URL:-http://localhost:8080/api}
VITE_APP_ENV: ${VITE_APP_ENV:-production}
VITE_APP_VERSION: ${VITE_APP_VERSION:-local}
container_name: promata-frontend-prod
environment:
- NODE_ENV=production
ports:
- "${FRONTEND_PROD_PORT_MAPPING:-8080:8080}"
networks:
- promata_prod
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
profiles: ["prod-test"]
volumes:
frontend_node_modules:
frontend_vite_cache:
frontend_cache:
networks:
promata_dev:
driver: bridge
promata_prod:
driver: bridge