feat: Add Gmail Catchall Labeler service with configuration and functionality
Build and Push Docker Image / build-and-push (push) Successful in 2m21s
Build and Push Docker Image / build-and-push (push) Successful in 2m21s
- Introduced a new Docker Compose configuration for the Gmail Catchall Labeler service. - Implemented GmailOptions class for managing configuration settings. - Developed GmailApiClient to interact with the Gmail API, including methods for fetching messages and managing labels. - Created models for Gmail messages, labels, and headers. - Added IGmailClient interface to define the contract for Gmail client implementations. - Implemented GmailOrganizer to handle the organization of emails based on recipient addresses. - Developed LabelNameResolver for generating label names based on local parts of email addresses. - Created RecipientExtractor to extract local parts from email headers. - Implemented state management with OrganizerState and StateStore for persisting state information. - Added Worker class to manage the background processing of email organization. - Created unit tests for GmailOrganizer, LabelNameResolver, and RecipientExtractor to ensure functionality. - Added necessary project files and configurations for building and running the application.
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
gmail-catchall-labeler:
|
||||
image: git.arnemoerman.be/arne/gmail-catchall-labeler:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
GMAIL_CLIENT_ID: ${GMAIL_CLIENT_ID}
|
||||
GMAIL_CLIENT_SECRET: ${GMAIL_CLIENT_SECRET}
|
||||
GMAIL_REFRESH_TOKEN: ${GMAIL_REFRESH_TOKEN}
|
||||
GMAIL_USER_ID: me
|
||||
CATCHALL_DOMAIN: arnemoerman.be
|
||||
LABEL_PREFIX: ArneM.be
|
||||
LABEL_NAME_OVERRIDES: >-
|
||||
{"wildewesten":"Wilde Westen","sciencealert":"Science Alert","ecopower":"EcoPower","tomscott":"Tom Scott","linkedin":"LinkedIn","degeleflamingo":"De Gele Flamingo","shopapp":"ShopApp","ccdesteiger":"CC De Steiger","leseitanist":"Le Seitanist","dewatergroep":"De Watergroep","veganbox":"VeganBox","energyid":"EnergyId"}
|
||||
POLL_INTERVAL_SECONDS: 60
|
||||
PROCESS_EXISTING: "true"
|
||||
MIGRATE_CHANGED_LABELS: "true"
|
||||
STATE_PATH: /data/state.json
|
||||
ASPNETCORE_HTTP_PORTS: 8080
|
||||
expose:
|
||||
- "8080"
|
||||
volumes:
|
||||
- gmail-catchall-labeler-data:/data
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: any
|
||||
delay: 5s
|
||||
|
||||
volumes:
|
||||
gmail-catchall-labeler-data:
|
||||
Reference in New Issue
Block a user