Configure dashboard for dashboard.1440.news
- docker-compose.yml: Traefik routing for dashboard.1440.news - OAUTH_BASE_URL set to https://dashboard.1440.news - routes.go: Updated default base URL to dashboard.1440.news - Local dev accessible at dashboard.1440.localhost
This commit is contained in:
+5
-11
@@ -15,7 +15,7 @@ services:
|
|||||||
DB_USER: dba_1440_news
|
DB_USER: dba_1440_news
|
||||||
DB_PASSWORD_FILE: /run/secrets/db_password
|
DB_PASSWORD_FILE: /run/secrets/db_password
|
||||||
DB_NAME: db_1440_news
|
DB_NAME: db_1440_news
|
||||||
OAUTH_BASE_URL: https://app.1440.news
|
OAUTH_BASE_URL: https://dashboard.1440.news
|
||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
networks:
|
networks:
|
||||||
@@ -23,24 +23,18 @@ services:
|
|||||||
- atproto
|
- atproto
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
# Production: HTTPS with Let's Encrypt for app.1440.news
|
# Production: HTTPS with Let's Encrypt for dashboard.1440.news
|
||||||
- "traefik.http.routers.dashboard-1440.rule=Host(`app.1440.news`)"
|
- "traefik.http.routers.dashboard-1440.rule=Host(`dashboard.1440.news`)"
|
||||||
- "traefik.http.routers.dashboard-1440.entrypoints=https"
|
- "traefik.http.routers.dashboard-1440.entrypoints=https"
|
||||||
- "traefik.http.routers.dashboard-1440.tls.certresolver=letsencrypt-dns"
|
- "traefik.http.routers.dashboard-1440.tls.certresolver=letsencrypt-dns"
|
||||||
# Production: HTTPS for 1440.news root (accounts directory) - lower priority than PDS API paths
|
|
||||||
- "traefik.http.routers.root-1440.rule=Host(`1440.news`)"
|
|
||||||
- "traefik.http.routers.root-1440.entrypoints=https"
|
|
||||||
- "traefik.http.routers.root-1440.tls.certresolver=letsencrypt-dns"
|
|
||||||
- "traefik.http.routers.root-1440.priority=10"
|
|
||||||
# Production: HTTP to HTTPS redirect
|
# Production: HTTP to HTTPS redirect
|
||||||
- "traefik.http.routers.dashboard-1440-redirect.rule=Host(`app.1440.news`) || Host(`1440.news`)"
|
- "traefik.http.routers.dashboard-1440-redirect.rule=Host(`dashboard.1440.news`)"
|
||||||
- "traefik.http.routers.dashboard-1440-redirect.entrypoints=http"
|
- "traefik.http.routers.dashboard-1440-redirect.entrypoints=http"
|
||||||
- "traefik.http.routers.dashboard-1440-redirect.middlewares=https-redirect"
|
- "traefik.http.routers.dashboard-1440-redirect.middlewares=https-redirect"
|
||||||
- "traefik.http.routers.dashboard-1440-redirect.priority=10"
|
|
||||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||||
# Local development
|
# Local development
|
||||||
- "traefik.http.routers.dashboard-1440-local.rule=Host(`app.1440.localhost`)"
|
- "traefik.http.routers.dashboard-1440-local.rule=Host(`dashboard.1440.localhost`)"
|
||||||
- "traefik.http.routers.dashboard-1440-local.entrypoints=http"
|
- "traefik.http.routers.dashboard-1440-local.entrypoints=http"
|
||||||
# Shared service
|
# Shared service
|
||||||
- "traefik.http.services.dashboard-1440.loadbalancer.server.port=4321"
|
- "traefik.http.services.dashboard-1440.loadbalancer.server.port=4321"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ func (d *Dashboard) StartServer(addr string) error {
|
|||||||
if baseURL == "" {
|
if baseURL == "" {
|
||||||
// Default based on whether we're in production
|
// Default based on whether we're in production
|
||||||
if strings.Contains(addr, "0.0.0.0") {
|
if strings.Contains(addr, "0.0.0.0") {
|
||||||
baseURL = "https://app.1440.news"
|
baseURL = "https://dashboard.1440.news"
|
||||||
} else {
|
} else {
|
||||||
baseURL = "http://" + addr
|
baseURL = "http://" + addr
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user