-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yaml
77 lines (72 loc) · 1.44 KB
/
docker-compose.yaml
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
version: '3.8'
services:
api-my-readings:
build:
context: .
dockerfile: Dockerfile.node
container_name: api-my-readings
restart: always
entrypoint: sh -c "yarn install && yarn start:dev"
environment:
MONGODB_URI: ${MONGODB_URI}
MONGODB_PORT: ${MONGODB_PORT}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
NGINX_PORT: ${NGINX_PORT}
networks:
- app_network
volumes:
- .:/app/
- /app/node_modules
depends_on:
- mongodb
- redis
links:
- mongodb
ports:
- ${PORT}:${PORT}
mongodb:
image: mongo:latest
container_name: mongodb
environment:
MONGODB_URI: ${MONGODB_URI}
volumes:
- data:/data/db
ports:
- ${MONGODB_PORT}:${MONGODB_PORT}
networks:
- app_network
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
container_name: nginx
restart: always
ports:
- ${NGINX_PORT}:${NGINX_PORT}
expose:
- ${NGINX_PORT}
networks:
- app_network
links:
- api-my-readings
redis:
image: redis:latest
container_name: redis
restart: always
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_PORT=6379
- REDIS_HOST=localhost
ports:
- ${REDIS_PORT}:${REDIS_PORT}
hostname: ${REDIS_HOST}
networks:
- app_network
volumes:
- cache:/data
volumes:
data:
cache:
networks:
app_network: