networks:
  nw-letto:
    external: true

# Der Name bestimmt das Projekt und sollte bei jeder yml-Datei unterschiedlich sein - er kann mit -p bei docker-compose überschrieben werden
name: letto-download

services:
  download:
    image: lettohub/letto-download:stable
    restart: always
    networks:
      - nw-letto
    hostname: letto-download
    container_name: letto-download
    deploy:
      resources:
        limits:
          memory: "${DOWNLOAD_MEMORY_LIMIT:-1G}"
    logging:
      driver: "json-file"
      options:
        max-size: "2m"
        max-file: "3"
    volumes:
      - ${VOLUME_DOWNLOAD:-/opt/letto/docker/storage/download}:/var/www/html/download
      - ${VOLUME_WIKI:-/opt/letto/docker/storage/wiki}:/var/www/html/wiki
      - ${VOLUME_LOG:-/opt/letto/docker/storage/log}/download:/log
    environment:
      - TZ=${TIMEZONE:-Europe/Berlin}
      - LC_ALL=${LOCALE:-de_DE.UTF-8}
      - USER_NAME=${DOWNLOAD_USERNAME:-user}
      - USER_PASSWORD=${SERVICE_USER_PASSWORD}
      - ROOT_PASSWORD=${SERVICE_ADMIN_PASSWORD}
      - SUDOUSER_NAME=${DOWNLOAD_ADMINNAME:-admin}
      - SUDOUSER_PASSWORD=${SERVICE_ADMIN_PASSWORD}
      - APACHE_SERVERNAME=${SERVER_NAME}
      - APACHE_ADMIN=${EMAIL:-}
