Fix typo
lemon-mint committed
Nov 13, 2025 at 11:43 UTC
377bc177e214a52c05a9e71ef6024deeae946875
4 files changed
+12
-12
Dockerfile
+1
-1
@@ -30,7 +30,7 @@ COPY --from=builder /src/dist /app/dist
30
# Set default environment variables
31
ENV STATIC_DIR=/app/dist
32
ENV PORTAL_UI_URL=http://localhost:4017
33
-ENV POSTAL_FRONTEND_URL=http://*.localhost:4017
33
+ENV PORTAL_FRONTEND_URL=http://*.localhost:4017
34
ENV BOOTSTRAP_URIS=ws://localhost:4017/relay
35
36
# Expose ports
README.md
+1
-1
@@ -49,7 +49,7 @@ http://localhost:4017
49
#
50
# Then edit docker-compose.yml environment for your domain:
51
PORTAL_UI_URL: https://yourservice.com
52
-POSTAL_FRONTEND_URL: https://*.yourservice.com
52
+PORTAL_FRONTEND_URL: https://*.yourservice.com
53
BOOTSTRAP_URIS: wss://yourservice.com/relay
54
55
```
cmd/relay-server/main.go
+9
-9
@@ -33,10 +33,10 @@ func main() {
33
if defaultStaticDir == "" {
34
defaultStaticDir = "./dist"
35
}
36
- // Parse PORTAL_UI_URL or POSTAL_FRONTEND_URL to extract portal host
36
+ // Parse PORTAL_UI_URL or PORTAL_FRONTEND_URL to extract portal host
37
defaultPortalHost := os.Getenv("PORTAL_UI_URL")
38
if defaultPortalHost == "" {
39
- defaultPortalHost = os.Getenv("POSTAL_FRONTEND_URL")
39
+ defaultPortalHost = os.Getenv("PORTAL_FRONTEND_URL")
40
}
41
if defaultPortalHost != "" {
42
// Extract host from URL (supports wildcard patterns like http://*.localhost:4017)
@@ -85,7 +85,7 @@ func runServer() error {
85
// Set portal UI URL from environment or construct from portal host
86
portalUIURL = os.Getenv("PORTAL_UI_URL")
87
if portalUIURL == "" {
88
- portalUIURL = os.Getenv("POSTAL_FRONTEND_URL")
88
+ portalUIURL = os.Getenv("PORTAL_FRONTEND_URL")
89
}
90
if portalUIURL == "" {
91
portalUIURL = "http://" + portalHost
@@ -93,13 +93,13 @@ func runServer() error {
93
// Trim trailing slashes
94
portalUIURL = strings.TrimSuffix(portalUIURL, "/")
95
96
- // Set portal frontend pattern from POSTAL_FRONTEND_URL
97
- postalFrontendURL := os.Getenv("POSTAL_FRONTEND_URL")
98
- if postalFrontendURL != "" {
96
+ // Set portal frontend pattern from PORTAL_FRONTEND_URL
97
+ portalFrontendURL := os.Getenv("PORTAL_FRONTEND_URL")
98
+ if portalFrontendURL != "" {
99
// Extract host pattern from URL (e.g., http://*.localhost:4017 -> *.localhost:4017)
100
- postalFrontendURL = strings.TrimPrefix(postalFrontendURL, "http://")
101
- postalFrontendURL = strings.TrimPrefix(postalFrontendURL, "https://")
102
- portalFrontendPattern = postalFrontendURL
100
+ portalFrontendURL = strings.TrimPrefix(portalFrontendURL, "http://")
101
+ portalFrontendURL = strings.TrimPrefix(portalFrontendURL, "https://")
102
+ portalFrontendPattern = portalFrontendURL
103
}
104
105
// Set bootstrap URIs from environment
docker-compose.yml
+1
-1
@@ -10,7 +10,7 @@ services:
10
environment:
11
STATIC_DIR: ${STATIC_DIR:-/app/dist}
12
PORTAL_UI_URL: ${PORTAL_UI_URL:-http://localhost:${PORTAL_PORT:-4017}}
13
- POSTAL_FRONTEND_URL: ${POSTAL_FRONTEND_URL:-http://*.localhost:${PORTAL_PORT:-4017}}
13
+ PORTAL_FRONTEND_URL: ${PORTAL_FRONTEND_URL:-http://*.localhost:${PORTAL_PORT:-4017}}
14
BOOTSTRAP_URIS: ${BOOTSTRAP_URIS:-ws://localhost:${PORTAL_PORT:-4017}/relay}
15
ports:
16
- "4017:4017"