philschmid HF staff commited on
Commit
1b0b961
1 Parent(s): cc0f83e
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -32,10 +32,11 @@ RUN rm /etc/nginx/conf.d/default.conf
32
  COPY --from=build /app/dist /usr/share/nginx/html
33
 
34
  # Replace the default nginx.conf with our configuration
35
- COPY nginx.conf /etc/nginx/conf.d
36
 
37
- # Change ownership of the necessary directories and files to the non-root user
38
- RUN chown -R user:user /usr/share/nginx/html /etc/nginx/conf.d /var/cache/nginx /var/log/nginx
 
39
 
40
  # Ensure the /var/run/nginx.pid file has correct permissions
41
  RUN touch /var/run/nginx.pid && chown user:user /var/run/nginx.pid
 
32
  COPY --from=build /app/dist /usr/share/nginx/html
33
 
34
  # Replace the default nginx.conf with our configuration
35
+ COPY nginx.conf /etc/nginx/nginx.conf
36
 
37
+ # Create the necessary directories and set the correct permissions
38
+ RUN mkdir -p /var/cache/nginx/client_temp /var/cache/nginx/proxy_temp /var/cache/nginx/fastcgi_temp /var/cache/nginx/uwsgi_temp /var/cache/nginx/scgi_temp && \
39
+ chown -R user:user /usr/share/nginx/html /etc/nginx /var/cache/nginx /var/run /var/log/nginx
40
 
41
  # Ensure the /var/run/nginx.pid file has correct permissions
42
  RUN touch /var/run/nginx.pid && chown user:user /var/run/nginx.pid