version: "3"
services:
  2fauth:
    image: 2fauth/2fauth
    container_name: 2fauth
    volumes:
      - /srv/appdata/2fauth:/2fauth
    ports:
      - 8000:8000/tcp
    environment:
      # You can change the name of the app
      - APP_NAME=2FAuth
      - APP_ENV=local
      - APP_DEBUG=false
      - SITE_OWNER=mail@example.com
      - APP_KEY=SomeRandomStringOf32CharsExactly #32 caractères
      # This variable must match your installation's external address.
      # Webauthn won't work otherwise.
      - APP_URL=http://localhost
      - IS_DEMO_APP=false
      - LOG_CHANNEL=daily
      - LOG_LEVEL=notice
      - DB_DATABASE="/srv/database/database.sqlite"
      - CACHE_DRIVER=file
      - SESSION_DRIVER=file
     # - MAIL_DRIVER=log
     # - MAIL_HOST=smtp.mailtrap.io
     # - MAIL_PORT=2525
     # - MAIL_USERNAME=null
     # - MAIL_PASSWORD=null
     # - MAIL_ENCRYPTION=null
     # - MAIL_FROM_NAME=null
     # - MAIL_FROM_ADDRESS=null
      - MAIL_VERIFY_SSL_PEER=true
      - THROTTLE_API=60
      - LOGIN_THROTTLE=5
      - AUTHENTICATION_GUARD=web-guard
      - AUTH_PROXY_HEADER_FOR_USER=null
      - AUTH_PROXY_HEADER_FOR_EMAIL=null
      - PROXY_LOGOUT_URL=null
      - WEBAUTHN_NAME=2FAuth
      - WEBAUTHN_ID=null
      - WEBAUTHN_ICON=null
      - WEBAUTHN_USER_VERIFICATION=preferred
      - TRUSTED_PROXIES=null
      - PROXY_FOR_OUTGOING_REQUESTS=null
      - BROADCAST_DRIVER=log
      - QUEUE_DRIVER=sync
      - SESSION_LIFETIME=120
      - REDIS_HOST=127.0.0.1
      - REDIS_PASSWORD=null
      - REDIS_PORT=6379
      - PUSHER_APP_ID=
      - PUSHER_APP_KEY=
      - PUSHER_APP_SECRET=
      - PUSHER_APP_CLUSTER=mt1
      - VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
      - VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
      - MIX_ENV=local