-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
139 lines (122 loc) · 3.5 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: "3"
services:
# Frontend
client:
container_name: client
build:
context: ./client
dockerfile: Dockerfile
image: mutcompute:client
ports:
- 3000:3000
volumes:
- ./client/src:/app/src
command: yarn start
# Backend
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
image: mutcompute:backend
ports:
- "5000:5000"
volumes:
- ./backend/:/app/
- ./data:/app/data
environment:
SES_EMAIL_HOST: ${SES_EMAIL_HOST}
SES_EMAIL_PORT: ${SES_EMAIL_PORT}
SES_SMTP_USERNAME: ${SES_SMTP_USERNAME}
SES_SMTP_PASSWORD: ${SES_SMTP_PASSWORD}
DB_URI: ${DB_URI_BACKEND}
HOSTNAME: ${HOSTNAME}
PORT: ${PORT}
depends_on:
- nn_api
# command: gunicorn -b 0.0.0.0:5000 api:app
entrypoint: python /app/api.py
# nn_api:
# container_name: nn_api
# build:
# context: ./nets
# dockerfile: Dockerfile
# image: mutcompute:api
# volumes:
# - ./nets:/mutcompute_2020
# - ./data:/mutcompute_2020/data
# environment:
# PYTHONUNBUFFERED: 1
# PYTHONPATH: /mutcompute_2020:/mutcompute_2020/mutcompute
# DB_URI: ${DB_URI_NN_API}
# DB_NN_TABLE: ${DB_NN_TABLE}
# depends_on:
# - redis
# - celery
# ports:
# - 8000
# working_dir: /mutcompute_2020/api
# entrypoint: python api.py
# # #Queue/Worker Processes
# celery:
# container_name: celery
# build:
# context: ./nets
# dockerfile: Dockerfile
# image: mutcompute:api
# volumes:
# - ./nets:/mutcompute_2020
# - ./data:/mutcompute_2020/data
# environment:
# PYTHONUNBUFFERED: 1
# PYTHONPATH: /mutcompute_2020:/mutcompute_2020/mutcompute
# CELERY_BROKER_URL: redis://redis:6379/0
# CELERY_RESULT_BACKEND: redis://redis:6379/0
# SES_EMAIL_HOST: ${SES_EMAIL_HOST}
# SES_EMAIL_PORT: ${SES_EMAIL_PORT}
# SES_SMTP_USERNAME: ${SES_SMTP_USERNAME}
# SES_SMTP_PASSWORD: ${SES_SMTP_PASSWORD}
# DB_URI: ${DB_URI_NN_API}
# DB_NN_TABLE: ${DB_NN_TABLE}
# HOSTNAME: ${HOSTNAME}
# PORT: ${PORT}
# working_dir: /mutcompute_2020/api
# entrypoint: celery -A task.celery worker -l debug --concurrency 2
# # entrypoint: celery -A task.celery worker --loglevel=DEBUG --concurrency 2 -P solo
# depends_on:
# - redis
# redis:
# container_name: redis
# image: redis:latest
# hostname: redis
# ports:
# - 6379
# # # Reverse Proxy
# nginx:
# container_name: nginx
# image: nginx:latest
# restart: unless-stopped
# ports:
# - 80:80
# - 443:443
# volumes:
# - ./nginx/nginx_ssl.conf:/etc/nginx/conf.d/default.conf
# - ./nginx/certbot/conf:/etc/letsencrypt
# - ./nginx/certbot/www:/var/www/certbot
# command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
# # SSL certificates
# certbot:
# image: certbot/certbot
# restart: unless-stopped
# 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;'"
# # flower:
# # container_name: FLOWER
# # image: mher/flower
# # command: flower --broker=redis://redis:6379/0 --port=8888
# # ports:
# # - 9181:8888
# # depends_on:
# # - celery