forked from LukaZeleznik/OpenAir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
87 lines (80 loc) · 2.33 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3'
services:
nodejs:
build:
context: NodeJs
dockerfile: Dockerfile
image: nodejs
container_name: nodejs
restart: unless-stopped
depends_on:
- db
env_file: .env
command: nodemon -L app.js
environment:
- MONGO_USERNAME=$MONGO_USERNAME
- MONGO_PASSWORD=$MONGO_PASSWORD
- MONGO_HOSTNAME=db
- MONGO_PORT=$MONGO_PORT
- MONGO_DB=$MONGO_DB
ports:
- "8080:8080"
volumes:
- ./nodejs:/home/node/app
- ./nodejs/node_modules:/home/node/app/node_modules
networks:
- app-network
#command: ./nodejs/wait-for.sh db:27017 -- /home/node/app/node_modules/.bin/nodemon app.js
db:
image: mongo:4.2.8
container_name: mongo
restart: unless-stopped
env_file: .env
environment:
- MONGO_INITDB_ROOT_USERNAME=$MONGO_USERNAME
- MONGO_INITDB_ROOT_PASSWORD=$MONGO_PASSWORD
ports:
- "27017:27017"
volumes:
- dbdata:/data/db
networks:
- app-network
nginx:
build:
context: nginx
dockerfile: Dockerfile
image: nginx:mainline
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "81:81"
volumes:
- ./nginx/www:/var/www/
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/certbot-etc:/etc/letsencrypt
- ./nginx/certbot-var:/var/lib/letsencrypt
networks:
- app-network
# certbot:
# image: certbot/certbot
# container_name: certbot
# volumes:
# - ./nginx/certbot-etc:/etc/letsencrypt
# - ./nginx/certbot-var:/var/lib/letsencrypt
# - ./nginx/opentravian:/var/www/opentravian
# depends_on:
# - nodejs
# command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email --staging -d luki.ml
networks:
app-network:
driver: bridge
volumes:
dbdata:
node_modules:
# web-root:
# driver: local
# driver_opts:
# type: none
# device: /home/luki/node_project/views/
# o: bind