mirror of
https://github.com/khoaliber/LetterFeed.git
synced 2026-03-02 13:18:27 +00:00
feat: configurable backend url
This commit is contained in:
15
.env.example
15
.env.example
@@ -1,17 +1,18 @@
|
|||||||
# The base URL of the application, e.g., http://localhost:3000 or https://letterfeed.example.com
|
# The base URL of the application, e.g., http://localhost:3000 or https://letterfeed.example.com
|
||||||
LETTERFEED_APP_BASE_URL=http://localhost:3000
|
# LETTERFEED_APP_BASE_URL=http://localhost:3000
|
||||||
|
# LETTERFEED_BACKEND_URL=http://backend:8000 # URL of the backend service
|
||||||
|
|
||||||
# The database URL. Change this if you change the volume mount point
|
# The database URL. Change this if you change the volume mount point
|
||||||
LETTERFEED_DATABASE_URL=sqlite:////data/letterfeed.db
|
# LETTERFEED_DATABASE_URL=sqlite:////data/letterfeed.db
|
||||||
|
|
||||||
# IMAP server settings. Must have IMAP over SSL on port 993
|
# IMAP server settings. Must have IMAP over SSL on port 993
|
||||||
LETTERFEED_IMAP_SERVER=
|
# LETTERFEED_IMAP_SERVER=
|
||||||
LETTERFEED_IMAP_USERNAME=
|
# LETTERFEED_IMAP_USERNAME=
|
||||||
LETTERFEED_IMAP_PASSWORD=
|
# LETTERFEED_IMAP_PASSWORD=
|
||||||
|
|
||||||
# Email processing settings
|
# Email processing settings
|
||||||
LETTERFEED_SEARCH_FOLDER=INBOX # The folder in which to search for new emails
|
# LETTERFEED_SEARCH_FOLDER=INBOX # The folder in which to search for new emails
|
||||||
# LETTERFEED_MOVE_TO_FOLDER= # Optional: Folder to move processed emails
|
# LETTERFEED_MOVE_TO_FOLDER= # Folder to move processed emails
|
||||||
# LETTERFEED_MARK_AS_READ=true # Mark processed emails as read
|
# LETTERFEED_MARK_AS_READ=true # Mark processed emails as read
|
||||||
# LETTERFEED_EMAIL_CHECK_INTERVAL=15 # Interval between checks for new emails
|
# LETTERFEED_EMAIL_CHECK_INTERVAL=15 # Interval between checks for new emails
|
||||||
# LETTERFEED_AUTO_ADD_NEW_SENDERS=false # Automatically set up new emails for unknown senders
|
# LETTERFEED_AUTO_ADD_NEW_SENDERS=false # Automatically set up new emails for unknown senders
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ services:
|
|||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ services:
|
|||||||
frontend:
|
frontend:
|
||||||
image: ghcr.io/leonmuscoden/letterfeed-frontend:latest
|
image: ghcr.io/leonmuscoden/letterfeed-frontend:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ import type { NextConfig } from "next";
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
|
const backendUrl = process.env.LETTERFEED_BACKEND_URL || "http://backend:8000";
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: '/api/:path*',
|
source: "/api/:path*",
|
||||||
destination: 'http://backend:8000/:path*',
|
destination: `${backendUrl}/:path*`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user