Skip to content

Instantly share code, notes, and snippets.

@rs-ds

rs-ds/.dockerignore

Created Jul 4, 2020
Embed
What would you like to do?
Backend Services
.git
.venv
media
upload
node_modules
dist
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}
# 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
You can’t perform that action at this time.