-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (65 loc) · 1.52 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
version: "3"
services:
mongodb:
image: mongo:4.2
container_name: mongodb
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASS}
- MONGO_INITDB_DATABASE=${MONGO_DB}
restart: unless-stopped
networks:
- api-net
volumes:
- ./mongo-data:/data/db
mongo-express:
image: mongo-express:0.54.0
container_name: mongo-express
depends_on:
- mongodb
networks:
- api-net
restart: unless-stopped
environment:
- ME_CONFIG_MONGODB_SERVER=mongodb
- ME_CONFIG_MONGODB_URL=mongodb://${MONGO_USER}:${MONGO_PASS}@mongodb:27017/${MONGO_DB}
- ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_USER}
- ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_PASS}
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
env_file:
- ./mongo-express_env
redis:
image: redis:7.0
container_name: redis
restart: unless-stopped
networks:
- api-net
command: redis-server --requirepass ${redis_pass}
volumes:
- ./cache:/data
backend:
image: backend
container_name: backend-container
build:
context: .
restart: unless-stopped
depends_on:
- mongodb
- redis
networks:
- api-net
nginx:
image: nginx:1.21
container_name: nginx_proxy
restart: on-failure
depends_on:
- backend
networks:
- api-net
ports:
- "8080:8080"
- "8082:8081"
volumes:
- ./conf.d/:/etc/nginx/conf.d/
networks:
api-net: