-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (79 loc) · 1.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (79 loc) · 1.75 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
services:
# GraphQL Server
graphql-server:
build:
context: .
dockerfile: Dockerfile.server
ports:
- "4000:4000"
environment:
- NODE_ENV=production
- PORT=4000
- GRAPHQL_ENDPOINT=http://localhost:4000/graphql
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
networks:
- nhl-network
# Frontend
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
ports:
- "3000:80"
depends_on:
graphql-server:
condition: service_healthy
environment:
- PUBLIC_GRAPHQL_ENDPOINT=http://localhost:4000/graphql
restart: unless-stopped
networks:
- nhl-network
# Development services
graphql-server-dev:
build:
context: .
dockerfile: Dockerfile.server
target: build
ports:
- "4001:4000"
environment:
- NODE_ENV=development
- PORT=4000
volumes:
- ./graphql-server/src:/app/graphql-server/src
- ./shared:/app/shared
command: ["npm", "run", "dev"]
networks:
- nhl-network
profiles:
- dev
frontend-dev:
build:
context: .
dockerfile: Dockerfile.frontend
target: build
ports:
- "5173:5173"
environment:
- PUBLIC_GRAPHQL_ENDPOINT=http://localhost:4001/graphql
volumes:
- ./frontend/src:/app/frontend/src
- ./shared:/app/shared
command: ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
working_dir: /app/frontend
networks:
- nhl-network
profiles:
- dev
networks:
nhl-network:
driver: bridge
volumes:
node_modules_server:
node_modules_frontend: