forked from Iryna-Gry/fix-lab-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.local.example.yml
137 lines (131 loc) · 2.84 KB
/
docker-compose.local.example.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
version: "3.8"
services:
mongo:
build:
target: mongo
dockerfile: ./apps/database/Dockerfile
args:
MONGO_VERSION: 6
container_name: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=
- MONGO_INITDB_ROOT_PASSWORD=
- MONGO_INITDB_DATABASE=
- MONGO_REPLICA_HOST=
- 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
start_interval: 1s
retries: 30
app:
image: "jc21/nginx-proxy-manager:latest"
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "81:81"
- "443:443"
volumes:
- ./nginx/data:/data
- ./nginx/letsencrypt:/etc/letsencrypt
networks:
- backend
server:
build:
context: .
target: runner
dockerfile: ./apps/server/Dockerfile
container_name: server
restart: unless-stopped
env_file: ./apps/server/.env.docker
environment:
- NODE_ENV=production
volumes:
- ./apps/server/public:/app/apps/server/public
- /app/node_modules
- /app/apps/server/node_modules
ports:
- 30000:3000
networks:
- backend
depends_on:
- mongo
links:
- mongo
admin:
build:
context: .
target: runner
dockerfile: ./apps/admin/Dockerfile
args:
DATABASE_URL: #Add URL
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:
- "30002:3002"
networks:
- client
- backend
client:
build:
context: .
target: runner
dockerfile: ./apps/client/Dockerfile
args:
DATABASE_URL: #Add URL
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:
- "30001:3001"
networks:
- client
- backend
networks:
client:
driver: bridge
backend:
driver: bridge
volumes:
database:
driver: local