Ramses II
commited on
Commit
•
b26378c
1
Parent(s):
676bf15
auto msg
Browse files- Dockerfile +5 -5
- entrypoint.sh +5 -1
- nginx.conf +3 -2
Dockerfile
CHANGED
@@ -27,12 +27,12 @@ RUN chmod +x /app/entrypoint.sh
|
|
27 |
RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/fastcgi \
|
28 |
/var/lib/nginx/proxy /var/lib/nginx/scgi \
|
29 |
/var/lib/nginx/uwsgi /var/log/nginx \
|
30 |
-
&& chown -R ${NB_UID}:${NB_GID} /var/lib/nginx /var/log/nginx /var/run \
|
31 |
-
&& chmod 755 /var/lib/nginx
|
32 |
|
33 |
-
# Ensure Nginx has permissions to write to log directory
|
34 |
-
RUN touch /var/log/nginx/error.log /var/log/nginx/access.log \
|
35 |
-
&& chown -R ${NB_UID}:${NB_GID} /var/log/nginx
|
36 |
|
37 |
# Set the permissions for the app directory to the existing user
|
38 |
RUN chown -R ${NB_UID}:${NB_GID} /app
|
|
|
27 |
RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/fastcgi \
|
28 |
/var/lib/nginx/proxy /var/lib/nginx/scgi \
|
29 |
/var/lib/nginx/uwsgi /var/log/nginx \
|
30 |
+
&& chown -R ${NB_UID}:${NB_GID} /var/lib/nginx /var/log/nginx /var/run /run \
|
31 |
+
&& chmod 755 /var/lib/nginx /var/run /run
|
32 |
|
33 |
+
# Ensure Nginx has permissions to write to log directory and PID file
|
34 |
+
RUN touch /var/log/nginx/error.log /var/log/nginx/access.log /run/nginx.pid \
|
35 |
+
&& chown -R ${NB_UID}:${NB_GID} /var/log/nginx /run/nginx.pid
|
36 |
|
37 |
# Set the permissions for the app directory to the existing user
|
38 |
RUN chown -R ${NB_UID}:${NB_GID} /app
|
entrypoint.sh
CHANGED
@@ -3,5 +3,9 @@
|
|
3 |
# Start JupyterLab in the background
|
4 |
jupyter lab --ip=0.0.0.0 --port=${JUPYTERLAB_PORT} --no-browser --allow-root --NotebookApp.base_url=/jupyter &
|
5 |
|
|
|
|
|
|
|
|
|
6 |
# Start Nginx in the foreground
|
7 |
-
nginx -g "daemon off;"
|
|
|
3 |
# Start JupyterLab in the background
|
4 |
jupyter lab --ip=0.0.0.0 --port=${JUPYTERLAB_PORT} --no-browser --allow-root --NotebookApp.base_url=/jupyter &
|
5 |
|
6 |
+
# Ensure the Nginx PID file is writable
|
7 |
+
touch /tmp/nginx.pid
|
8 |
+
chmod 644 /tmp/nginx.pid
|
9 |
+
|
10 |
# Start Nginx in the foreground
|
11 |
+
nginx -g "daemon off;" -c /etc/nginx/nginx.conf
|
nginx.conf
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
worker_processes 1;
|
2 |
|
3 |
events {
|
@@ -35,7 +36,7 @@ http {
|
|
35 |
proxy_set_header Connection "upgrade";
|
36 |
}
|
37 |
|
38 |
-
error_log /
|
39 |
-
access_log /
|
40 |
}
|
41 |
}
|
|
|
1 |
+
pid /tmp/nginx.pid;
|
2 |
worker_processes 1;
|
3 |
|
4 |
events {
|
|
|
36 |
proxy_set_header Connection "upgrade";
|
37 |
}
|
38 |
|
39 |
+
error_log /tmp/nginx_error.log;
|
40 |
+
access_log /tmp/nginx_access.log;
|
41 |
}
|
42 |
}
|