-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.local.yml
165 lines (158 loc) · 3.49 KB
/
docker-compose.local.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
version: '3.8'
services:
mongo:
build:
target: mongo
dockerfile: ./apps/database/Dockerfile
args:
MONGO_VERSION: 6
container_name: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME= #USERNAME
- MONGO_INITDB_ROOT_PASSWORD= #PASSWORD
- MONGO_INITDB_DATABASE= #DATABASE
- MONGO_REPLICA_HOST=mongo
- MONGO_REPLICA_PORT=27018
- MONGO_COMMAND=mongosh
- INIT_REPL_CMD=3
volumes:
- ./apps/database/data:/data/db
- ./apps/database/conf/mongod.conf.orig:/etc/mongod.conf
ports:
- 27018:27018
networks:
- backend
restart: always
healthcheck:
# Use "mongo" instead of "mongosh" before v5.0
test:
[
'CMD',
'mongosh',
'admin',
'--port',
'27018',
'--eval',
"db.adminCommand('ping').ok",
]
interval: 5s
timeout: 30s
start_period: 0s
retries: 30
mongo-seed:
build:
context: .
target: mongo-seed
dockerfile: ./apps/database/Dockerfile
args:
MONGO_VERSION: 6
SERVICE_PATH: apps/database
container_name: mongo-seed
networks:
- backend
depends_on:
- mongo
server:
build:
context: .
target: runner
dockerfile: ./apps/server/Dockerfile
args:
BUILD_MODE: local
container_name: server
restart: unless-stopped
env_file: ./apps/server/.env.docker.local
environment:
- NODE_ENV=production
volumes:
- ./apps/server/public:/app/apps/server/public
- /app/node_modules
- /app/apps/server/node_modules
- shared-prisma:/app/apps/server/prisma
ports:
- 3000:3000
networks:
- backend
depends_on:
- mongo
links:
- mongo
prisma-studio:
build:
context: .
target: prisma-runner
dockerfile: ./apps/server/Dockerfile
container_name: prisma-studio
restart: unless-stopped
env_file: ./apps/server/.env.docker.local
environment:
- NODE_ENV=production
volumes:
- /app/node_modules
- /app/apps/server/node_modules
- shared-prisma:/app/apps/server/prisma
ports:
- 5555:5555
networks:
- backend
depends_on:
- mongo
links:
- mongo
admin:
build:
context: .
target: runner
dockerfile: ./apps/admin/Dockerfile
args:
DATABASE_URL: #Add URL
BUILD_MODE: local
container_name: admin
restart: unless-stopped
stdin_open: true
tty: true
env_file: ./apps/admin/.env.docker.local
environment:
- NODE_ENV=production
volumes:
- ./apps/admin/public:/app/apps/admin/public
- /app/node_modules
- /app/apps/admin/node_modules
ports:
- 3002:3002
networks:
- client
- backend
client:
build:
context: .
target: runner
dockerfile: ./apps/client/Dockerfile
args:
DATABASE_URL: #Add URL
BUILD_MODE: local
container_name: client
restart: unless-stopped
stdin_open: true
tty: true
env_file: ./apps/client/.env.docker.local
environment:
- NODE_ENV=production
volumes:
- ./apps/client/public:/app/apps/client/public
- /app/node_modules
- /app/apps/client/node_modules
ports:
- 3001:3001
networks:
- client
- backend
networks:
client:
driver: bridge
backend:
driver: bridge
volumes:
database:
driver: local
shared-prisma: