-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (65 loc) · 1.18 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:
api:
build:
dockerfile: Dockerfile
context: .
restart: on-failure
tty: true
volumes:
- .:/usr/src/app
env_file:
- .env
ports:
- "3000:3000"
depends_on:
- mongodb
- redis
networks:
- default
mongodb:
image: mongo
env_file:
- .env
environment:
- MONGO_INITDB_ROOT_USERNAME=${DB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${DB_PASS}
ports:
- "27017:27017"
restart: on-failure
volumes:
- mongo:/data/db
networks:
- default
redis:
image: redis
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
restart: on-failure
ports:
- "6379:6379"
volumes:
- redis:/data
networks:
- default
# nginx:
# build:
# dockerfile: Dockerfile
# context: nginx
# restart: unless-stopped
# tty: true
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/ngnix.conf
# depends_on:
# - api
# networks:
# - default
networks:
default:
driver: bridge
volumes:
redis:
driver: local
mongo: