-
-
Notifications
You must be signed in to change notification settings - Fork 299
/
docker-compose.yml
74 lines (69 loc) · 2.44 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
version: '2.4'
x-web-defaults: &web-defaults
restart: unless-stopped
build:
context: backend
dockerfile: 'Dockerfile'
volumes:
- ./backend:/app
- ./frontend:/frontend
depends_on:
- redis
environment:
OCTOPRINT_TUNNEL_PORT_RANGE: '0-0'
EMAIL_HOST: '${EMAIL_HOST-}'
EMAIL_HOST_USER: '${EMAIL_HOST_USER-}'
EMAIL_HOST_PASSWORD: '${EMAIL_HOST_PASSWORD-}'
EMAIL_PORT: '${EMAIL_PORT-587}'
EMAIL_USE_TLS: '${EMAIL_USE_TLS-True}'
DEFAULT_FROM_EMAIL: '${[email protected]}'
DEBUG: '${DEBUG-False}' # Don't set DEBUG to True unless you know what you are doing. Otherwise the static files will be cached in browser until hard-refresh
ADMIN_IP_WHITELIST: '${ADMIN_IP_WHITELIST-}'
SITE_USES_HTTPS: '${SITE_USES_HTTPS-False}'
SITE_IS_PUBLIC: '${SITE_IS_PUBLIC-False}'
CSRF_TRUSTED_ORIGINS: '${CSRF_TRUSTED_ORIGINS-}'
SOCIAL_LOGIN: '${SOCIAL_LOGIN-False}'
REDIS_URL: '${REDIS_URL-redis://redis:6379}'
DATABASE_URL: '${DATABASE_URL-sqlite:////app/db.sqlite3}'
INTERNAL_MEDIA_HOST: '${INTERNAL_MEDIA_HOST-http://web:3334}'
ML_API_HOST: '${ML_API_HOST-http://ml_api:3333}'
ACCOUNT_ALLOW_SIGN_UP: '${ACCOUNT_ALLOW_SIGN_UP-False}'
WEBPACK_LOADER_ENABLED: '${WEBPACK_LOADER_ENABLED-False}'
TELEGRAM_BOT_TOKEN: '${TELEGRAM_BOT_TOKEN-}'
TWILIO_ACCOUNT_SID: '${TWILIO_ACCOUNT_SID-}'
TWILIO_AUTH_TOKEN: '${TWILIO_AUTH_TOKEN-}'
TWILIO_FROM_NUMBER: '${TWILIO_FROM_NUMBER-}'
SENTRY_DSN: '${SENTRY_DSN-}'
PUSHOVER_APP_TOKEN: '${PUSHOVER_APP_TOKEN-}'
SLACK_CLIENT_ID: '${SLACK_CLIENT_ID-}'
SLACK_CLIENT_SECRET: '${SLACK_CLIENT_SECRET-}'
DJANGO_SECRET_KEY: '${DJANGO_SECRET_KEY-}'
SYNDICATE: '${SYNDICATE-}'
VERSION:
services:
ml_api:
hostname: ml_api
restart: unless-stopped
build:
context: ml_api
environment:
DEBUG: 'True'
FLASK_APP: 'server.py'
# ML_API_TOKEN:
tty: true
command: bash -c "gunicorn --bind 0.0.0.0:3333 --workers 1 wsgi"
web:
<<: *web-defaults
hostname: web
ports:
- "3334:3334"
depends_on:
- ml_api
command: sh -c 'python manage.py migrate && python manage.py collectstatic -v 2 --noinput && daphne -b 0.0.0.0 -p 3334 config.routing:application'
tasks:
<<: *web-defaults
hostname: tasks
command: sh -c "celery -A config worker --beat -l info -c 2 -Q realtime,celery"
redis:
restart: unless-stopped
image: redis:7.2-alpine