-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (52 loc) · 1.25 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
version: '3'
services:
redis:
image: redis:6.2-alpine
ports:
- ${REDIS_PORT}:${REDIS_PORT}
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
networks:
- redis
mongodb:
image: mongo:5.0.6
ports:
- ${MONGODB_PORT}:${MONGODB_PORT}
volumes:
- mongodb:/data/db
networks:
- mongodb
api:
build:
context: ./
dockerfile: Dockerfile
environment:
- MONGODB_URL=${MONGODB_URL}
- NODE_ENV=${NODE_ENV}
- JWT_SECRET=${JWT_SECRET}
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- REDIS_PASSWORD=${REDIS_PASSWORD}
ports:
- '${PORT}:${PORT}'
depends_on:
- redis
- mongodb
volumes:
- api:/usr/src/radioju-api
- ./storage:/usr/src/radioju-api/storage
networks:
- api
- redis
- mongodb
volumes:
api:
driver: local
mongodb:
driver: local
networks:
api:
driver: bridge
redis:
driver: ipvlan
mongodb:
driver: ipvlan