-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
57 lines (55 loc) · 1.22 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
services:
website:
build: .
profiles: [prod]
ports:
- 3000:3000
restart: always
depends_on:
- mongo
- redis
volumes:
- "./static:/app/static"
- "./cache:/app/cache"
networks:
- skycrypt-network
mongo:
image: mongo:latest
restart: unless-stopped
networks:
- skycrypt-network
environment:
MONGO_INITDB_DATABASE: ${MONGO_DATABASE:?Set MONGO_DATABASE environment variable}
command: mongod --quiet --logpath /dev/null
ports:
- ${MONGO_PORT-27017}:27017
volumes:
- mongo-data:/data/db
redis:
image: redis:7-alpine
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD:?REDIS_PASSWORD env variable is required}
ports:
- "${REDIS_PORT-6379}:6379"
expose:
- "${REDIS_PORT-6379}"
networks:
- skycrypt-network
nginx:
image: nginx:latest
restart: unless-stopped
profiles: [prod]
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- website
networks:
- skycrypt-network
networks:
skycrypt-network:
name: skycrypt-network
driver: bridge
volumes:
mongo-data:
name: mongo-data