networks:
  default:
  reverse-proxy:
    external: true

services:
  service-http: &service-http
    command:
      - /sebn-taskbar-manager/apache.sh
    restart: always
    environment:
      - ADMIN
      - CELERY_BROKER
      - CHANNELS_BROKER
      - DATA_ACQUISITION_URL
      - EMAIL_HOST
      - EMAIL_PORT
      - LANG
      - LDAP_ADMINS
      - LDAP_BASE
      - LDAP_DOMAIN
      - LDAP_USERNAME
      - LDAP_PASSWORD
      - LDAP_HOST
      - LDAP_PORT
      - MYSQL_DATABASE
      - MYSQL_HOST
      - MYSQL_PASSWORD
      - MYSQL_PORT
      - MYSQL_USER
      - SECRET_KEY
      - SERVER_EMAIL
      - TELEGRAM_BOT_TOKEN
      - TZ
    volumes:
      - attachments:/sebn-taskbar-manager/backend/attachments
    networks:
      default:
      reverse-proxy:
        aliases:
          - sebn-taskbar-manager-http
    image: sebn-taskbar-manager

  service-ws:
    <<: *service-http
    command:
      - /sebn-taskbar-manager/daphne.sh
    networks:
      default:
      reverse-proxy:
        aliases:
          - sebn-taskbar-manager-ws

  task-queue:
    <<: *service-http
    command:
      - ../celery.sh
    networks:
      default:
      reverse-proxy:
    depends_on:
      - redis
      - service-http

  telegram-bot:
    <<: *service-http
    command: python manage.py start_polling

  redis:
    image: redis
    restart: always

volumes:
  attachments:

version: "3.8"
