-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
72 lines (71 loc) · 1.74 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
version: '3.5'
services:
eoc-landing:
container_name: eoc_landing_container
restart: always
build: ./landing
ports:
- '80'
eoc-migrate:
container_name: eoc_migrate_container
restart: on-failure
build:
context: .
dockerfile: Dockerfile.cd
links:
- mongo
environment:
DB_URL: mongodb://mongo/eoc
DB_SERVER_URL: mongodb://mongo
command: npm run migrate:up
eoc-server:
container_name: eoc_server_container
restart: always
build:
context: .
dockerfile: Dockerfile.cd
ports:
- '8080'
links:
- mongo
environment:
DB_URL: mongodb://mongo/eoc
GOOGLE_API_USER:
GOOGLE_CALLBACK_URL:
GOOGLE_CLIENT_ID:
GOOGLE_CLIENT_SECRET:
GOOGLE_REFRESH_TOKEN:
HOST:
EXPRESS_SESSION_KEY:
SENDGRID_API_KEY:
nginx-production:
container_name: eoc_nginx_production
restart: always
build: ./nginx
ports:
- '80:80'
- '443:443'
volumes:
- /etc/nginx/.htpasswd:/etc/nginx/.htpasswd
- /data/certbot/conf:/etc/letsencrypt
- /data/certbot/www:/var/www/certbot
links:
- eoc-server
- eoc-landing
command: '/bin/sh -c ''while :; do sleep 24h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
mongo:
container_name: eoc_mongo_container
image: mongo
restart: always
volumes:
- /data/db:/data/db
ports:
- '27017'
certbot:
container_name: eoc_certbot_container
image: certbot/certbot
restart: unless-stopped
volumes:
- /data/certbot/conf:/etc/letsencrypt
- /data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 24h & wait $${!}; done;'"