feat: update configuration options to use Optional types and enhance documentation structure

This commit is contained in:
Christian Krakau-Louis
2025-04-01 23:33:51 +02:00
parent 8769982cea
commit adfd5c9757
3 changed files with 25 additions and 16 deletions
+3 -3
View File
@@ -60,9 +60,9 @@ class Settings(BaseSettings):
imap2_delete_after_process: bool = False
# Google Drive settings
google_drive_credentials_json: str = ""
google_drive_folder_id: str = ""
google_drive_delegate_to: str = "" # Optional delegated user email
google_drive_credentials_json: Optional[str] = ""
google_drive_folder_id: Optional[str] = ""
google_drive_delegate_to: Optional[str] = "" # Optional delegated user email
# WebDAV settings
webdav_url: Optional[str] = None
+14 -5
View File
@@ -28,6 +28,7 @@ For a complete list of configuration options, see the [Configuration Guide](Conf
3. Fill in the service account details and click "Create"
4. Add appropriate roles (e.g., "Editor" for full access)
5. Click "Continue" and then "Done"
6. Note down the service account's email address (it will look like: `service-name@project-id.iam.gserviceaccount.com`)
### 3. Generate Service Account Key
@@ -37,13 +38,15 @@ For a complete list of configuration options, see the [Configuration Guide](Conf
4. Choose JSON format and click "Create"
5. The key file will be downloaded automatically
### 4. Configure DocuNova
### 4. Share Your Google Drive Folder with the Service Account
1. Open the downloaded JSON key file
2. Set the entire JSON content as the `GOOGLE_DRIVE_CREDENTIALS_JSON` environment variable
3. For security, ensure the JSON is properly escaped if your deployment method requires it
1. Navigate to the desired folder in Google Drive
2. Right-click on the folder and select "Share"
3. Enter the service account's email address that you noted down in step 2
4. Set the permission to "Editor" (to allow the service account to create/upload files)
5. Click "Send" to share the folder (you can uncheck "Notify people" as the service account won't receive emails)
### Get Google Drive Folder ID
### 5. Get Google Drive Folder ID
To find your Google Drive folder ID:
@@ -52,6 +55,12 @@ To find your Google Drive folder ID:
3. The string after "folders/" is your folder ID (in this example: `1a2b3c4d5e6f7g8h9i0j`)
4. Set this value as `GOOGLE_DRIVE_FOLDER_ID` in your configuration
### 6. Configure DocuNova
1. Open the downloaded JSON key file
2. Set the entire JSON content as the `GOOGLE_DRIVE_CREDENTIALS_JSON` environment variable
3. For security, ensure the JSON is properly escaped if your deployment method requires it
### Domain-Wide Delegation (Optional)
If you need the service account to access files on behalf of users in your Google Workspace:
+8 -8
View File
@@ -7,14 +7,14 @@ Welcome to the DocuNova documentation. This directory contains comprehensive gui
- [User Guide](UserGuide.md) - How to use DocuNova's features and interface
- [API Documentation](API.md) - Complete API reference for developers
- [Deployment Guide](DeploymentGuide.md) - How to deploy DocuNova in various environments
- [Configuration Guide](ConfigurationGuide.md) - All available configuration options, including:
- Dropbox integration
- Nextcloud integration
- Paperless NGX integration
- Google Drive integration
- Authentication setup
- Email processing configuration
- [Troubleshooting](Troubleshooting.md) - Solutions to common issues
- [Configuration](ConfigurationMaster.md) - Overview of configuration options, including:
- [Configuration Guide](ConfigurationGuide.md) - Complete list of all available configuration parameters
- [Google Drive Setup](GoogleDriveSetup.md) - How to set up Google Drive integration
- [Dropbox Setup](DropboxSetup.md) - How to set up Dropbox integration
- [OneDrive Setup](OneDriveSetup.md) - How to set up Microsoft OneDrive/Graph integration
- [Amazon S3 Setup](AmazonS3Setup.md) - How to set up Amazon S3 integration
- [Configuration Troubleshooting](ConfigurationTroubleshooting.md) - Solutions to common configuration issues
- [Troubleshooting](Troubleshooting.md) - General troubleshooting and solutions to common issues
## Additional Resources