-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (50 loc) · 1.07 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
version: '3.7'
services:
backend-arithmetic-calculator-api:
build:
context: .
dockerfile: Dockerfile
image: backend-arithmetic-calculator-api
container_name: backend-arithmetic-calculator-api
ports:
- "3000:3000"
depends_on:
- mongodb
- cache
env_file: config/.env.docker
environment:
- NODE_ENV=docker
- REDIS_HOST=cache
- REDIS_PORT=6379
- REDIS_PASSWORD=eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
networks:
- app-network
command: >
sh -c "npm start"
mongodb:
image: mongo:6-jammy
ports:
- '27017:27017'
volumes:
- dbdata6:/data/db
networks:
- app-network
cache:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
volumes:
cache:
driver: local
dbdata6:
driver: local
networks:
app-network:
driver: bridge