Skip to content

Commit 3ff5ea3

Browse files
Merge pull request #69 from timoa/fix/66-docker-helm
fix(docker): fix Nginx path #66
2 parents b250492 + 30e5812 commit 3ff5ea3

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎charts/openconcho/values.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ securityContext:
5353
# Directories mounted as ephemeral tmpfs (in-memory) to satisfy nginx's write requirements
5454
# when the root filesystem is read-only. Add entries for any additional writable paths.
5555
tmpfsMounts:
56+
- mountPath: /etc/nginx/conf.d
5657
- mountPath: /var/cache/nginx
5758
- mountPath: /var/run
5859
- mountPath: /tmp

‎docker/40-openconcho-config.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Lets one prebuilt image target any Honcho backend without a rebuild.
44
# OPENCONCHO_DEFAULT_HONCHO_URL — absolute URL seeding the first instance, or empty.
55
# OPENCONCHO_UPSTREAM_ALLOWLIST — optional comma-separated host globs (SSRF guard).
6-
# Runs from /docker-entrypoint.d before nginx starts. Requires the html dir to
7-
# be writable (default); skip or bind-mount config.js when running --read-only.
6+
# Runs from /docker-entrypoint.d before nginx starts. Writes config.js to /tmp
7+
# so the container works cleanly under a read-only root filesystem.
88
set -eu
99

10-
cat > /usr/share/nginx/html/config.js <<EOF
10+
cat > /tmp/openconcho-config.js <<EOF
1111
window.__OPENCONCHO_DEFAULT_HONCHO_URL__ = "${OPENCONCHO_DEFAULT_HONCHO_URL:-}";
1212
EOF
1313

‎docker/nginx.conf.template‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ server {
3939
# Runtime config — regenerated per container start, must never be cached.
4040
location = /config.js {
4141
add_header Cache-Control "no-cache, no-store, must-revalidate";
42-
try_files $uri =404;
42+
alias /tmp/openconcho-config.js;
4343
}
4444

4545
# Long-cache static assets — Vite hashes filenames so they're immutable.

0 commit comments

Comments
 (0)