-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (55 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
60 lines (55 loc) · 1.22 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
# services ports are for debugging
# while publishing disable them
# use docker netowrking to connect with other services
# <service_name> will connect with docker services that is running. automatic DNS
#
# server, db should be on private network
# client should be on the public network
# nginx will be the middleman connecting both the networks
services:
server:
build: ./server/unified/
ports:
- "5000:5000"
volumes:
- ./server/unified/:/app
networks:
- private
db:
image: mysql:8.3
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ./db:/var/lib/mysql
networks:
- private
client:
build: ./client
# client need to depend on db or server since it doesn't need them to function during building process
# depends_on:
# - "db"
# - "server"
# environment:
# WATCHPACK_POLLING: "true"
# ports:
# - "3000:3000"
# volumes:
# - ./client/:/app
networks:
- public
nginx:
image: nginx:1.25.4
# depends_on:
# - "server"
volumes:
- ./nginx/:/etc/nginx/
ports:
- "8080:80"
networks:
- private
- public
networks:
public:
private: