-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
67 lines (61 loc) · 1.66 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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: astroluma
environment:
PORT: 8000
NODE_ENV: production
SECRET_KEY: jK8hB2mL6qv9NxX0PzWrDt5Yc3FgT4Vu
MONGODB_URI: mongodb://127.0.0.1:27017/astroluma
volumes:
- uploads_data:/app/storage/uploads
depends_on:
- mongodb
restart: always
network_mode: "host" ## is important to function the network scanning. The bridge mode puts it behind NAT and the host mode puts it on the same network as the host.
mongodb:
image: mongo:4.0 ##More recent versions of MongoDB needs AVX2 support, so it's better to use the 4.0 version.
container_name: astroluma_mongodb
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
restart: always
volumes:
mongo_data:
driver: local
uploads_data:
driver: local
## Alt config, with more locked down networking & simplified addressing
#services:
# app:
# build:
# context: .
# dockerfile: Dockerfile
# ports:
# - "8000:8000"
# container_name: astroluma
# environment:
# PORT: 8000
# NODE_ENV: production
# SECRET_KEY: jK8hB2mL6qv9NxX0PzWrDt5Yc3FgT4Vu
# MONGODB_URI: mongodb://mongodb/astroluma
# volumes:
# - uploads_data:/app/storage/uploads
# depends_on:
# - mongodb
# restart: always
# mongodb:
# image: mongo:4.0 ##More recent versions of MongoDB needs AVX2 support, so it's better to use the 4.0 version.
# container_name: astroluma_mongodb
# volumes:
# - mongo_data:/data/db
# restart: always
#volumes:
# mongo_data:
# driver: local
# uploads_data:
# driver: local