Skip to content

Commit 3e34182

Browse files
committed
add email support basics
1 parent fe8584a commit 3e34182

3 files changed

Lines changed: 33 additions & 7 deletions

File tree

.env.example

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,47 @@ DATABASE_URL='postgres://postgres:postgres@localhost:5432/postgres'
33
OPENAI_API_KEY='sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
44
OPENAI_BASE_URL='https://api.deepseek.com/v1'
55
LLM_MODEL='deepseek-chat'
6-
RUN_MODE='webhook' # webhook or polling
7-
WEBHOOK_DOMAIN=''
8-
WEBHOOK_SECRET=''
6+
RUN_MODE='polling' # webhook or polling
7+
WEBHOOK_DOMAIN='https://your-domain.ngrok-free.app'
8+
WEBHOOK_SECRET='your-webhook-secret-here'
99
WEBHOOK_HOST='localhost'
1010
WEBHOOK_PORT='8080'
11-
LOG_LEVEL='info'
11+
LOG_LEVEL='debug'
1212
# Dev purpose, comma separated. Keep it empty to allow all
1313
ALLOWED_USERS=''
1414
# Seed purpose - set the Telegram ID of the user to seed transactions for
1515
SEED_USER_TG_ID=''
16+
17+
# --- OpenTelemetry Configuration ---
18+
# OTEL_SERVICE_NAME: Name of the service for OpenTelemetry.
19+
# Default: cashout-telegram-bot
20+
OTEL_SERVICE_NAME="cashout"
21+
22+
# OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: Endpoint for OTLP log exporter.
23+
# Default: http://localhost:4318/v1/logs
24+
# The application currently uses an insecure (HTTP) connection for this endpoint.
25+
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="http://localhost:4318/v1/logs"
26+
27+
# OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: Endpoint for OTLP metrics exporter.
28+
# Default: http://localhost:4318/v1/metrics
29+
# The application currently uses an insecure (HTTP) connection for this endpoint.
30+
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="http://localhost:4318/v1/metrics"
31+
1632
# Web Server Configuration
1733
WEB_DASHBOARD_URL='http://localhost:8081/web/dashboard'
18-
WEB_HOST=localhost
34+
WEB_HOST=127.0.0.1
1935
WEB_PORT=8081
36+
2037
# Session Configuration (optional)
21-
SESSION_SECRET=your-random-session-secret-here
38+
SESSION_SECRET='your-random-session-secret-here'
2239
SESSION_DURATION_MIN=43200 # 30 days
40+
2341
# Bot Health Check Token
24-
HEALTH_CHECK_TOKEN=your-secret-token
42+
HEALTH_CHECK_TOKEN='your-secret-token'
2543
# Bot Health Check Port
2644
HEALTH_CHECK_PORT=8082
45+
46+
# Email configuration
47+
BREVO_API_KEY='xkeysib-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxx'
48+
EMAIL_FROM_NAME='Cashout App'
49+
EMAIL_FROM_ADDRESS='noreply@your-domain.com'

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ require (
1414
)
1515

1616
require (
17+
github.com/getbrevo/brevo-go v1.1.3 // indirect
1718
github.com/google/uuid v1.6.0 // indirect
1819
github.com/jackc/pgpassfile v1.0.0 // indirect
1920
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
66
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
77
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
88
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9+
github.com/getbrevo/brevo-go v1.1.3 h1:8TYrhhxbfAJLGArlPzCDKzbNfzvjIykBRhTDzLJqmyw=
10+
github.com/getbrevo/brevo-go v1.1.3/go.mod h1:ExhytIoPxt/cOBl6ZEMeEZNLUKrWEYA5U3hM/8WP2bg=
911
github.com/go-co-op/gocron v1.37.0 h1:ZYDJGtQ4OMhTLKOKMIch+/CY70Brbb1dGdooLEhh7b0=
1012
github.com/go-co-op/gocron v1.37.0/go.mod h1:3L/n6BkO7ABj+TrfSVXLRzsP26zmikL4ISkLQ0O8iNY=
1113
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=

0 commit comments

Comments
 (0)