Ramses II
commited on
Commit
·
46649e0
1
Parent(s):
136dd39
auto msg
Browse files- Dockerfile +5 -0
- nginx.conf +21 -9
Dockerfile
CHANGED
@@ -22,6 +22,11 @@ COPY entrypoint.sh /app/entrypoint.sh
|
|
22 |
# Set the entrypoint script as executable
|
23 |
RUN chmod +x /app/entrypoint.sh
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
# Set the permissions for the app directory to the existing user
|
26 |
RUN chown -R ${NB_UID}:${NB_GID} /app
|
27 |
|
|
|
22 |
# Set the entrypoint script as executable
|
23 |
RUN chmod +x /app/entrypoint.sh
|
24 |
|
25 |
+
# Ensure Nginx has permissions to write to log directory
|
26 |
+
RUN mkdir -p /var/log/nginx && \
|
27 |
+
touch /var/log/nginx/error.log && \
|
28 |
+
chown -R ${NB_UID}:${NB_GID} /var/log/nginx
|
29 |
+
|
30 |
# Set the permissions for the app directory to the existing user
|
31 |
RUN chown -R ${NB_UID}:${NB_GID} /app
|
32 |
|
nginx.conf
CHANGED
@@ -1,17 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
http {
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
server {
|
3 |
-
listen
|
4 |
-
server_name
|
5 |
|
6 |
location / {
|
7 |
-
|
8 |
-
index index.html;
|
9 |
-
}
|
10 |
-
|
11 |
-
location /jupyter/ {
|
12 |
-
proxy_pass http://localhost:8888;
|
13 |
proxy_set_header Host $host;
|
14 |
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
15 |
}
|
|
|
|
|
|
|
16 |
}
|
17 |
-
}
|
|
|
1 |
+
worker_processes 1;
|
2 |
+
|
3 |
+
events {
|
4 |
+
worker_connections 1024;
|
5 |
+
}
|
6 |
+
|
7 |
http {
|
8 |
+
include mime.types;
|
9 |
+
default_type application/octet-stream;
|
10 |
+
|
11 |
+
sendfile on;
|
12 |
+
keepalive_timeout 65;
|
13 |
+
|
14 |
server {
|
15 |
+
listen 7860;
|
16 |
+
server_name localhost;
|
17 |
|
18 |
location / {
|
19 |
+
proxy_pass http://127.0.0.1:8888;
|
|
|
|
|
|
|
|
|
|
|
20 |
proxy_set_header Host $host;
|
21 |
proxy_set_header X-Real-IP $remote_addr;
|
22 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
23 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
24 |
}
|
25 |
+
|
26 |
+
error_log /var/log/nginx/error.log;
|
27 |
+
access_log /var/log/nginx/access.log;
|
28 |
}
|
29 |
+
}
|