Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2.4'
- x-web-defaults: &web-defaults
- restart: unless-stopped
- build:
- context: web
- volumes:
- - ./web:/app
- depends_on:
- - redis
- environment:
- EMAIL_HOST: # -> such as smtp.gmail.com
- EMAIL_HOST_USER: # -> such as your email address for a Gmail account
- EMAIL_HOST_PASSWORD: # -> your email account password
- EMAIL_PORT: 587
- EMAIL_USE_TLS: 'True'
- DEFAULT_FROM_EMAIL: 'spaghetti@xxxxxxxx.de'
- DEBUG: 'False' # Don't set DEBUG to True, otherwise the static files will be cached in browser until hard-refresh
- SITE_USES_HTTPS: 'true' # set it to 'True' if https is set up
- SOCIAL_LOGIN: 'False'
- REDIS_URL: 'redis://redis:6379'
- DATABASE_URL: 'sqlite:////app/db.sqlite3'
- INTERNAL_MEDIA_HOST: 'http://web:3334'
- ML_API_HOST: 'http://ml_api:3333'
- #### Optional env vars below this line ###
- # TWILIO_ACCOUNT_SID: https://django-twilio.readthedocs.io/en/latest/settings.html for how to find and set the TWILIO_XXX vars
- # TWILIO_AUTH_TOKEN:
- # TWILIO_FROM_NUMBER:
- # ENALBE_HISTORY:
- # ML_API_TOKEN:
- # SENTRY_DSN:
- TELEGRAM_BOT_TOKEN:
- services:
- ml_api:
- hostname: ml_api
- restart: unless-stopped
- build:
- context: ml_api
- environment:
- DEBUG: 'True'
- FLASK_APP: 'server.py'
- # ML_API_TOKEN:
- # HAS_GPU: 'False'
- command: bash -c "gunicorn --bind 0.0.0.0:3333 --workers 2 wsgi"
- web:
- <<: *web-defaults
- hostname: web
- ports:
- - "3334:3334"
- labels:
- - traefik.backend=thespaghettidetective
- - traefik.frontend.rule=Host:spaghetti.xxxxxxxxx.de
- - traefik.docker.network=web
- - traefik.port=3334
- networks:
- - web
- depends_on:
- - ml_api
- command: sh -c "python manage.py collectstatic --noinput && python manage.py migrate && python manage.py runserver 0.0.0.0:3334"
- tasks:
- <<: *web-defaults
- hostname: tasks
- command: sh -c "celery -A config worker --beat -l info"
- redis:
- restart: unless-stopped
- image: redis:5.0-alpine
- networks:
- web:
- external: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement