Skip to content

Commit

Permalink
Make sure docker webserver log files are created with correct permiss…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
jonathangreen committed Jan 14, 2025
1 parent b20f0d9 commit 1fe401e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 1 addition & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ COPY docker/services/nginx /etc/nginx/

# Setup uwsgi
COPY docker/services/uwsgi /etc/
RUN mkdir -p /var/log/uwsgi && \
chown root:adm /var/log/uwsgi && \
touch /var/log/uwsgi/uwsgi.log && \
chown simplified:adm /var/log/uwsgi/uwsgi.log && \
chmod 644 /var/log/uwsgi/uwsgi.log && \
mkdir /var/run/uwsgi && \
RUN mkdir /var/run/uwsgi && \
chown simplified:simplified /var/run/uwsgi

# Setup runit
Expand Down
2 changes: 2 additions & 0 deletions docker/runit-web/nginx/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
set -e

mkdir -p /var/log/nginx
chown root:adm /var/log/nginx
exec /usr/sbin/nginx
5 changes: 5 additions & 0 deletions docker/runit-web/uwsgi/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
set -e

mkdir -p /var/log/uwsgi
chown root:adm /var/log/uwsgi
touch /var/log/uwsgi/uwsgi.log
chown simplified:adm /var/log/uwsgi/uwsgi.log
chmod 644 /var/log/uwsgi/uwsgi.log
exec /var/www/circulation/env/bin/uwsgi --ini /etc/uwsgi.ini

0 comments on commit 1fe401e

Please sign in to comment.