Fireshare: run nginx as root whatever user the upstream config names

Upstream switched prod.conf to "user appuser;", which the container does
not have, so nginx failed its config test on install and every update.
Its game asset alias points at /data, which is /opt/fireshare-data here.
This commit is contained in:
MickLesk
2026-11-28 14:00:24 +01:00
parent 796a8b292c
commit b43d52b91b
2 changed files with 4 additions and 2 deletions

View File

@@ -47,7 +47,8 @@ function update_script() {
if ! grep -q "__FIRESHARE_PORT__" /etc/nginx/nginx.conf; then
cp /opt/fireshare/app/nginx/prod.conf /etc/nginx/nginx.conf
sed -i 's|root /processed/|root /opt/fireshare-processed/|g' /etc/nginx/nginx.conf
sed -i 's/^user[[:space:]]\+nginx;/user root;/' /etc/nginx/nginx.conf
sed -i 's|alias /data/|alias /opt/fireshare-data/|g' /etc/nginx/nginx.conf
sed -i 's/^user[[:space:]]\+[^;]*;/user root;/' /etc/nginx/nginx.conf
sed -i 's|root[[:space:]]\+/app/build;|root /opt/fireshare/app/client/build;|' /etc/nginx/nginx.conf
sed -i 's/__FIRESHARE_PORT__/80/g' /etc/nginx/nginx.conf
cp /opt/fireshare/app/nginx/error.html /etc/nginx/

View File

@@ -140,7 +140,8 @@ $STD npm run build
systemctl stop nginx
cp /opt/fireshare/app/nginx/prod.conf /etc/nginx/nginx.conf
sed -i 's|root /processed/|root /opt/fireshare-processed/|g' /etc/nginx/nginx.conf
sed -i 's/^user[[:space:]]\+nginx;/user root;/' /etc/nginx/nginx.conf
sed -i 's|alias /data/|alias /opt/fireshare-data/|g' /etc/nginx/nginx.conf
sed -i 's/^user[[:space:]]\+[^;]*;/user root;/' /etc/nginx/nginx.conf
sed -i 's|root[[:space:]]\+/app/build;|root /opt/fireshare/app/client/build;|' /etc/nginx/nginx.conf
sed -i 's/__FIRESHARE_PORT__/80/g' /etc/nginx/nginx.conf
cp /opt/fireshare/app/nginx/error.html /etc/nginx/