fix: generate config.js inline via entrypoint — Unraid doesn't preserve execute bits on bind mounts
This commit is contained in:
+2
-1
@@ -311,6 +311,7 @@ services:
|
||||
# -------------------------------------------------------------------------
|
||||
# Public website (nginx + static assets). Anon key injected at boot.
|
||||
# No build step — Portainer-compatible (image + bind mounts).
|
||||
# config.js is generated inline (Unraid doesn't preserve execute bits).
|
||||
# -------------------------------------------------------------------------
|
||||
web:
|
||||
image: nginx:1.27-alpine
|
||||
@@ -324,7 +325,7 @@ services:
|
||||
volumes:
|
||||
- /mnt/user/appdata/mc-cars/frontend:/usr/share/nginx/html
|
||||
- /mnt/user/appdata/mc-cars/frontend/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- /mnt/user/appdata/mc-cars/frontend/99-config.sh:/docker-entrypoint.d/99-config.sh:ro
|
||||
entrypoint: ["/bin/sh", "-c", "printf 'window.MCCARS_CONFIG={SUPABASE_URL:\"%s\",SUPABASE_ANON_KEY:\"%s\"};\\n' \"$$SUPABASE_URL\" \"$$SUPABASE_ANON_KEY\" > /usr/share/nginx/html/config.js && exec nginx -g 'daemon off;'"]
|
||||
ports:
|
||||
- "55580:80"
|
||||
networks: [mccars]
|
||||
|
||||
Reference in New Issue
Block a user