
version: '3'

services:

  app:
    image: docker.med-logic.ru/medicine:latest
    container_name: medicine-app
    restart: "always"
    env_file: .env
    environment:
      UWSGI_PROCESSES: ${UWSGI_PROCESSES:-2}
      UWSGI_THREADS: ${UWSGI_THREADS:-4}
    ports:
      - "${NGINX_PORT:-80}:80"
      - "${NGINX_HTTPS_PORT:-433}:443"
    volumes:
      - medicine-public-data:/app/public
    networks:
      - medicine-network
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

  tasks:
    image: docker.med-logic.ru/medicine:latest
    container_name: medicine-tasks
    restart: "always"
    command: /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord-tasks.conf
    env_file: .env
    volumes:
      - medicine-public-data:/app/public
    networks:
      - medicine-network
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

volumes:
  medicine-public-data:

networks:
  medicine-network:
    external: true
