Fix UI on Linux not using the right user

This commit is contained in:
Théophile Diot 2023-06-01 10:20:30 -04:00
parent a68fb0c06a
commit 0c8bc97fae
No known key found for this signature in database
GPG Key ID: E752C80DB72BB014
3 changed files with 5 additions and 4 deletions

View File

@ -15,7 +15,7 @@ start() {
echo "Starting UI"
source /etc/bunkerweb/ui.env
export $(cat /etc/bunkerweb/ui.env)
python3 -m gunicorn --config /usr/share/bunkerweb/ui/gunicorn.conf.py main:app --bind 127.0.0.1:7000 &
python3 -m gunicorn --config /usr/share/bunkerweb/ui/gunicorn.conf.py &
echo $! > /var/run/bunkerweb/ui.pid
}

View File

@ -80,4 +80,4 @@ USER ui:ui
HEALTHCHECK --interval=10s --timeout=10s --start-period=30s --retries=6 CMD /usr/share/bunkerweb/helpers/healthcheck-ui.sh
ENV PYTHONPATH /usr/share/bunkerweb/deps/python
CMD ["python3", "-m", "gunicorn", "--config", "/usr/share/bunkerweb/ui/gunicorn.conf.py", "--bind", "0.0.0.0:7000"]
CMD ["python3", "-m", "gunicorn", "--config", "/usr/share/bunkerweb/ui/gunicorn.conf.py", "--user", "ui", "--group", "ui", "--bind", "0.0.0.0:7000"]

View File

@ -10,8 +10,8 @@ access_log_format = (
errorlog = "-"
preload_app = True
pidfile = join(sep, "var", "run", "bunkerweb", "ui.pid")
user = "ui"
group = "ui"
user = "nginx"
group = "nginx"
secure_scheme_headers = {
"X-FORWARDED-PROTOCOL": "https",
"X-FORWARDED-PROTO": "https",
@ -19,5 +19,6 @@ secure_scheme_headers = {
}
forwarded_allow_ips = "*"
proxy_allow_ips = "*"
bind = ["127.0.0.1:7000"]
worker_class = "gevent"
graceful_timeout = 0