version: '3'

services:
  medicine-remd:
    restart: "always"
    image: docker.med-logic.ru/medicine-remd:latest
    container_name: medicine-remd
    environment:
      UWSGI_PROCESSES: 2
      UWSGI_THREADS: 2
      SUPERVISOR_HTTP_USERNAME: user
      SUPERVISOR_HTTP_PASSWORD: password
      SECRET_KEY: 26km5gdji3qd0*#cj3rt1lj47)+2a2eoacl@2aj+7ngc8vjb
      POSTGRES_HOST: postgres-host
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: password
      POSTGRES_DB: medicine_remd
      REDIS_HOST: redis-host
      CACHE_REDIS_DB: 10
      CELERY_REDIS_DB: 11
    ports:
      - "870:80"
    volumes:
      - ./volumes/public:/app/public
    networks:
      - medicine-network
    external_links:
      - "postgres:postgres-host"
      - "redis:redis-host"
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

networks:
  medicine-network:
    external:
      name: "medicine-network"
