Created
July 4, 2020 14:21
-
-
Save rs-ds/3df686b719bd1ccc31c6006491837883 to your computer and use it in GitHub Desktop.
Backend Services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.git | |
.venv | |
media | |
upload | |
node_modules | |
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
worker: &worker | |
env_file: .env | |
restart: always | |
build: ./backend # Change this to your backend path. ed: ../my/backend/path | |
command: celery -A myapp.tasks worker --loglevel=info | |
links: | |
- mongo:mongo | |
- rabbitmq:rabbitmq | |
- postgres:postgres | |
- redis:redis | |
beat: | |
<<: *worker | |
command: celery -A config.celery_app beat --loglevel=info | |
backend: | |
<<: *worker | |
command: gunicorn autoapp:app -b :${BACKEND_PORT} | |
expose: | |
- ${BACKEND_PORT} | |
labels: | |
- traefik.enable=true | |
- traefik.backend.domain=${BACKEND_DOMAIN} | |
- traefik.frontend.rule=Host:${BACKEND_DOMAIN} | |
socket: | |
<<: *worker | |
command: python sio_server.py ${SOCKET_PORT} | |
expose: | |
- ${SOCKET_PORT} | |
labels: | |
- traefik.enable=true | |
- traefik.backend.domain=${SOCKET_DOMAIN} | |
- traefik.frontend.rule=Host:${SOCKET_DOMAIN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FROM reckonsys/python:latest | |
FROM python:3.7-slim | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN pip install -r requirements.txt | |
COPY . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment