-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.frontend.yml
More file actions
49 lines (46 loc) · 1.35 KB
/
docker-compose.frontend.yml
File metadata and controls
49 lines (46 loc) · 1.35 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
version: '3.8'
services:
# Nginx Gateway - serves as reverse proxy for everything
optimizer_gateway:
image: nginx:alpine
container_name: optimizer_gateway
restart: always
ports:
- "${GATEWAY_PORT:-80}:80"
volumes:
# Nginx configuration
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
# Driver app static files (if you have them)
- ./driver:/usr/share/nginx/html:ro
networks:
- optimizer_network
depends_on:
- optimizer_frontend
healthcheck:
test: [ "CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost" ]
interval: 30s
timeout: 10s
retries: 3
labels:
- "com.optimizer.service=gateway"
- "com.optimizer.description=Nginx Gateway - Routes to Dashboard, Driver App, API & WebSocket"
# Next.js Frontend (runs behind nginx)
optimizer_frontend:
build:
context: ./optimizer-ui
dockerfile: Dockerfile
container_name: optimizer_frontend
restart: always
environment:
# API calls go through nginx, so use relative paths
- NEXT_PUBLIC_API_BASE=/api
- NODE_ENV=production
networks:
- optimizer_network
labels:
- "com.optimizer.service=frontend"
- "com.optimizer.description=Next.js Dashboard Application"
networks:
optimizer_network:
name: optimizer_network
external: true