generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 79
/
docker-compose.yml
74 lines (68 loc) · 1.3 KB
/
docker-compose.yml
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
version: "3.8"
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile.api
target: api-development
command: yarn run dev
volumes:
- ./backend:/srv/backend
- backend_node_modules:/srv/backend/node_modules
expose:
- "4000"
- "27017"
ports:
- "4000:4000"
- "27017:27017"
restart: on-failure
networks:
- gateway
client:
build:
context: ./client
dockerfile: Dockerfile.client
target: client-development
command: yarn run start
volumes:
- ./client:/srv/client
- client_node_modules:/srv/client/node_modules
expose:
- "3000"
ports:
- "3000:3000"
environment:
BACKEND_HOST: backend
depends_on:
- backend
stdin_open: true
restart: on-failure
networks:
- gateway
nginx:
restart: always
build:
dockerfile: Dockerfile.nginx
context: ./nginx
ports:
- "80:80"
networks:
- gateway
depends_on:
- client
- backend
mailhog:
image: mailhog/mailhog
ports:
- 1025:1025 # smtp server
- 4100:8025 # web ui
depends_on:
- client
- backend
networks:
- gateway
networks:
gateway: {}
volumes:
client_node_modules:
backend_node_modules: