# Docker Compose file for the AliasVault all-in-one container
#
# Specific for NAS devices:
# - Uses custom HTTP ports by default to avoid conflicts
# - Uses named bind mounts for the database, logs and secrets to ensure they are persisted
#
version: "3"
services:
  aliasvault:
    image: ghcr.io/aliasvault/aliasvault:latest
    container_name: aliasvault
    restart: unless-stopped

    ports:
      - "1080:80"
      - "1443:443"
      - "25:25"
      - "587:587"

    volumes:
      - avdata:/database
      - avlogs:/logs
      - avsecrets:/secrets

    environment:
      HOSTNAME: "localhost"
      PUBLIC_REGISTRATION_ENABLED: "true"
      IP_LOGGING_ENABLED: "true"
      FORCE_HTTPS_REDIRECT: "false"
      SUPPORT_EMAIL: ""
      PRIVATE_EMAIL_DOMAINS: ""
      HIDDEN_PRIVATE_EMAIL_DOMAINS: ""

volumes:
  avdata:
  avlogs:
  avsecrets:
