forked from gotechnica/technica-expo-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·51 lines (50 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
version: '3'
services:
nginx:
image: nginx
volumes:
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
- ./nginx/conf.d:/etc/nginx/conf.d
ports:
- "80:80"
- "443:443"
networks:
- nginx_network
depends_on:
- web
certbot:
image: certbot/certbot
volumes:
- ./nginx/certbot/conf:/etc/letsencrypt
- ./nginx/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
web:
build:
context: ./api
volumes:
- ./api:/app
depends_on:
- db
links:
- db
networks:
- db_network
- nginx_network
command: gunicorn -b 0.0.0.0:80 server:app --capture-output
db:
image: mongo:4.1
environment:
MONGO_INITDB_DATABASE: expo-production
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- 27017:21017
command: --quiet
networks:
- db_network
networks:
nginx_network:
driver: bridge
db_network:
driver: bridge