version: '3.8'

services:
  elm-files:
    build: .
    container_name: elm_files_app
    restart: unless-stopped
    ports:
      - "127.0.0.1:5000:5000"
      - "127.0.0.1:8080:8080"
    volumes:
      - ./data/uploads:/data/uploads:rw
      - ./data/database.db:/data/database.db:rw
      - ./data/logs:/data/logs:rw
      - ./data/backup:/data/backup:rw
      - ./.env:/app/.env:ro
    env_file: .env
    environment:
      - TZ=Africa/Cairo
      - DOMAIN=files.elmaudit.com
    networks:
      - elm-net
    logging:
      driver: json-file
      options:
        max-size: "50m"
        max-file: "5"

networks:
  elm-net:
    driver: bridge