-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (57 loc) · 1.31 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
version: '3'
services:
api:
container_name: api
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
environment:
- PORT=8080
- MONGODB_STRING=$MONGODB_STRING
# - MONGODB_DATABASE=$MONGODB_DATABASE
# - JWT_SECRET=$JWT_SECRET
- SESSION_SECRET=$SESSION_SECRET
# - BCRYPT_ROUNDS=$BCRYPT_ROUNDS
- REDIS_PORT=6379
- REDIS_HOST=redis
- REDIS_PASSWORD=$REDIS_PASSWORD
volumes:
- .:/home/node/app
- ./docker/media:$MULTER_MEDIA_DESTINATION
ports:
- 8080:8080
links:
- mongodb
- redis
redis:
image: redis:alpine
restart: always
ports:
- 6379:6379
command: redis-server --requirepass $REDIS_PASSWORD
volumes:
- ./docker/redis:/data
nginx:
image: nginx:stable
restart: always
ports:
- 80:80
# - 443:443
volumes:
- ./docker/nginx:/etc/nginx/conf.d
# - /etc/letsencrypt/:/etc/letsencrypt/
links:
- api
mongodb:
image: mongodb/mongodb-community-server:latest
restart: always
ports:
- 27017:27017
environment:
- MONGODB_INITDB_ROOT_USERNAME=$MONGODB_USERNAME
- MONGODB_INITDB_ROOT_PASSWORD=$MONGODB_PASSWORD
volumes:
- type: bind
source: ./docker/mongodb/data
target: /data