Skip to content

Commit c6505a5

Browse files
committed
style fixes
1 parent de003e9 commit c6505a5

101 files changed

Lines changed: 956 additions & 574 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ DJANGO_SUPERUSER_USERNAME=admin
7676
DJANGO_SUPERUSER_EMAIL=admin@example.com
7777
DJANGO_SUPERUSER_PASSWORD=adminpass
7878

79-
NEWSLETTER_API_BASE_URL=http://nginx
79+
NEWSLETTER_API_INTERNAL_URL=http://127.0.0.1:8080
80+
NEWSLETTER_PUBLIC_URL=http://127.0.0.1:8080
8081
NEWSLETTER_API_USERNAME=admin
8182
NEWSLETTER_API_PASSWORD=adminpass
8283

8384
DEBUG=True
8485

85-
ALLOWED_HOSTS=localhost,127.0.0.1,newslettermaker.tech
86+
ALLOWED_HOSTS=localhost,127.0.0.1,nginx,newslettermaker.tech
8687

8788
FRONTEND_URL=http://localhost:3000

.env.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ REDDIT_CLIENT_SECRET=secret
88
REDDIT_USER_AGENT=newsletter-maker/test
99
CELERY_BROKER_URL=memory://
1010
CELERY_RESULT_BACKEND=cache+memory://
11+
ALLOWED_HOSTS=localhost,127.0.0.1,nginx,testserver
12+
NEWSLETTER_API_INTERNAL_URL=http://127.0.0.1:8080
13+
NEWSLETTER_PUBLIC_URL=http://127.0.0.1:8080

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ kubectl port-forward svc/newsletter-maker-newsletter-maker-nginx 8080:80
8585
> Frontend credentials (from seed):
8686
>
8787
> Username: demo_editor
88-
> Password: demo_password
88+
> Password: demo-password
8989
9090
**Command Summary:**
9191

core/settings_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class CoreSettings(Protocol):
1111
LINKEDIN_OAUTH_SCOPES: str
1212
METRICS_TOKEN: str
1313
NEWSLETTER_API_BASE_URL: str
14+
NEWSLETTER_API_INTERNAL_URL: str
15+
NEWSLETTER_PUBLIC_URL: str
1416
QDRANT_URL: str
1517
EMBEDDING_MODEL: str
1618
EMBEDDING_PROVIDER: str

deploy/helm/newsletter-maker/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data:
1313
CHANNEL_LAYER_URL: {{ default (include "newsletter-maker.redisUrl" .) .Values.env.channelLayerUrl | quote }}
1414
QDRANT_URL: {{ include "newsletter-maker.qdrantUrl" . | quote }}
1515
MESSAGING_ENABLED: {{ .Values.env.messagingEnabled | quote }}
16-
NEWSLETTER_API_BASE_URL: {{ .Values.env.newsletterApiBaseUrl | quote }}
16+
NEWSLETTER_PUBLIC_URL: {{ .Values.env.newsletterPublicUrl | quote }}
1717
EMAIL_BACKEND: {{ .Values.env.emailBackend | quote }}
1818
DEFAULT_FROM_EMAIL: {{ .Values.env.defaultFromEmail | quote }}
1919
SERVER_EMAIL: {{ .Values.env.serverEmail | quote }}

deploy/helm/newsletter-maker/values-minikube.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
debug: "true"
88
allowedHosts: "localhost,127.0.0.1,newsletter-maker.local"
99
csrfTrustedOrigins: "http://localhost,http://127.0.0.1,http://newsletter-maker.local"
10-
newsletterApiBaseUrl: "http://newsletter-maker.local"
10+
newsletterPublicUrl: "http://newsletter-maker.local"
1111

1212
nginx:
1313
service:

deploy/helm/newsletter-maker/values-staging.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
allowedHosts: "staging.newsletter-maker.example.com"
99
csrfTrustedOrigins: "https://staging.newsletter-maker.example.com"
1010
messagingEnabled: "true"
11-
newsletterApiBaseUrl: "https://staging.newsletter-maker.example.com"
11+
newsletterPublicUrl: "https://staging.newsletter-maker.example.com"
1212
logLevel: INFO
1313

1414
secrets:

deploy/helm/newsletter-maker/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
siteId: "1"
1414
channelLayerUrl: ""
1515
messagingEnabled: "true"
16-
newsletterApiBaseUrl: "http://newsletter-maker.local"
16+
newsletterPublicUrl: "http://newsletter-maker.local"
1717
emailBackend: anymail.backends.resend.EmailBackend
1818
defaultFromEmail: onboarding@resend.dev
1919
serverEmail: onboarding@resend.dev

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ services:
139139
env_file:
140140
- .env
141141
environment:
142-
NEWSLETTER_API_BASE_URL: http://nginx
142+
NEWSLETTER_API_INTERNAL_URL: http://nginx
143143
NEXT_TELEMETRY_DISABLED: "1"
144144
depends_on:
145145
nginx:

docs/admin-guide/configuration.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,45 @@
33
See the [Tunables Reference](../reference/tunables.md) for the exact list of algorithms and thresholds.
44

55
## Required vs Optional Variables
6-
**Required**:
7-
* `DATABASE_URL`, `REDIS_URL`, `QDRANT_URL`, `SECRET_KEY`, `NEWSLETTER_API_BASE_URL`.
6+
7+
**Required**:
8+
9+
* `DATABASE_URL`, `REDIS_URL`, `QDRANT_URL`, `SECRET_KEY`, `NEWSLETTER_PUBLIC_URL`.
10+
811
**Optional but critical for AI**:
12+
913
* `OPENROUTER_API_KEY` (Required for relevance tie-breaking and categorization).
1014

1115
## Secrets Handling
16+
1217
* In Docker Compose: Loaded tightly from the `.env` file mapped securely to the container.
1318
* In Kubernetes: Expected to be mapped into the Pod `env` spec via Secrets.
1419

1520
## Internal vs Public URLs
21+
1622
Due to container networking:
17-
* `NEWSLETTER_API_BASE_URL` (Internal) will reference inner hostnames like `http://nginx`.
23+
24+
* `NEWSLETTER_API_INTERNAL_URL` (Internal) should reference inner hostnames like `http://nginx` when the frontend talks to the backend over a private Docker or Kubernetes network.
1825
* `NEWSLETTER_PUBLIC_URL` (Public) should point to your real FQDN (e.g. `https://news.mydomain.com`) used in emails.
1926

27+
For local Docker Compose development, the default split is usually:
28+
29+
* `NEWSLETTER_API_INTERNAL_URL=http://nginx`
30+
* `NEWSLETTER_PUBLIC_URL=http://127.0.0.1:8080`
31+
2032
## Email Provider (Anymail)
33+
2134
Newsletter intake relies on Resend webhooks and Django Anymail forwarding.
2235
Configured via:
36+
2337
* `RESEND_API_KEY`
2438
* `RESEND_INBOUND_SECRET`
2539
* `DEFAULT_FROM_EMAIL`
2640

2741
## LLM Provider Routing
42+
2843
Select between `local`, `ollama` or remote providers using `EMBEDDING_PROVIDER`. Set URLs correctly to point to either the internal container (`http://ollama:11434`) or external APIs (`https://api.openai.com/v1`).
2944

3045
## OAuth Provider Toggles
46+
3147
If `LINKEDIN_CLIENT_ID` or `REDDIT_CLIENT_ID` are present, their respective capabilities light up dynamically in the application.

0 commit comments

Comments
 (0)