-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
121 lines (112 loc) · 2.68 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: "3.9"
services:
db:
container_name: JustEaTime-mongodb
image: mongo:6.0.6
restart: unless-stopped
env_file: .env
environment:
- MONGO_INITDB_ROOT_USERNAME=$DB_ADMIN
- MONGO_INITDB_ROOT_PASSWORD=$DB_ADMIN_PWD
- MONGO_INITDB_DATABASE=$DB_NAME
ports:
- '$DB_PORT:27017'
volumes:
- ./server/addons/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- dbdata:/data/db
networks:
- backend_network
express:
container_name: JustEaTime-mongo-express
image: mongo-express:latest
restart: always
depends_on:
- db
ports:
- 8081:8081
environment:
- ME_CONFIG_MONGODB_SERVER=db
- ME_CONFIG_MONGODB_ADMINUSERNAME=$DB_ADMIN
- ME_CONFIG_MONGODB_ADMINPASSWORD=$DB_ADMIN_PWD
networks:
- backend_network
backend:
container_name: JustEaTime-backend
build:
context: server
dockerfile: Dockerfile
restart: always
volumes:
- ./server:/opt/node_app/app
- ./server/package.json:/opt/node_app/package.json
- ./server/package-lock.json:/opt/node_app/package-lock.json
- notused:/opt/node_app/app/node_modules
links:
- db
- redis
depends_on:
- db
- redis
networks:
- backend_network
redis:
image: redis:7.0.11
container_name: JustEaTime-redis
restart: unless-stopped
env_file: .env
ports:
- '$REDIS_PORT:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass $REDIS_PASSWORD
volumes:
- cache:/data/cache
networks:
- backend_network
redisinsight:
container_name: JustEaTime-redisinsight
image: redislabs/redisinsight:1.14.0
ports:
- '8001:8001'
volumes:
- redisinsight:/db
environment:
- REDIS_URI=redis://redis:6379
networks:
- backend_network
frontend:
container_name: JustEaTime-frontend
build:
context: client
dockerfile: Dockerfile
restart: always
volumes:
- ./client:/opt/node_app/app
- ./client/package.json:/opt/node_app/package.json
- ./client/package-lock.json:/opt/node_app/package-lock.json
- notused:/opt/node_app/app/node_modules
depends_on:
- backend
networks:
- frontend_network
nginx:
container_name: JustEaTime-nginx
image: nginx:1.24.0-perl
restart: always
ports:
- 8080:8080
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- frontend
- backend
networks:
- frontend_network
- backend_network
networks:
backend_network:
frontend_network:
volumes:
redisinsight:
notused:
dbdata:
cache:
driver: local