services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped

    environment:
      # Required so links/emails (and some clients) use the correct public URL
      DOMAIN: "https://vault.sesur.dev"

      # Security defaults
      SIGNUPS_ALLOWED: "false"
      INVITATIONS_ALLOWED: "true"

      # WebSocket notifications for Bitwarden clients
      WEBSOCKET_ENABLED: "true"

      # Optional but recommended
      LOG_LEVEL: "info"

    volumes:
      - /srv/vaultwarden/data:/data

    ports:
      - "127.0.0.1:8222:80"
      - "127.0.0.1:3012:3012"

    env_file:
      - /srv/vaultwarden/env/vaultwarden.env
