clone3 commited on
Commit
206bd24
·
verified ·
1 Parent(s): 0d81600

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -10,6 +10,9 @@ RUN apt-get update && \
10
  apt-get clean && \
11
  rm -rf /var/lib/apt/lists/*
12
 
 
 
 
13
  # Copy backend server files and set permissions
14
  COPY build/ /app/build/
15
  COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
@@ -17,11 +20,9 @@ COPY etc/nginx/conf.d /etc/nginx/conf.d
17
  COPY webgl-build /usr/share/nginx/html
18
  COPY html-page /usr/share/nginx/html-page
19
 
20
- # Create necessary directories for Nginx and set permissions
21
- RUN mkdir -p /app/logs && \
22
- mkdir -p /var/log/nginx /var/lib/nginx /var/cache/nginx /var/lib/nginx/body /var/lib/nginx/fastcgi && \
23
- chown -R www-data:www-data /var/log/nginx /var/lib/nginx /var/cache/nginx /app /usr/share/nginx/html /usr/share/nginx/html-page && \
24
- chmod 755 /var/log/nginx /var/lib/nginx /var/cache/nginx /var/lib/nginx/body /var/lib/nginx/fastcgi
25
 
26
  # Copy and configure custom entrypoint script
27
  COPY entrypoint.sh /entrypoint.sh
 
10
  apt-get clean && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
+ # Create application directory
14
+ RUN mkdir -p /app /app/build /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx/html /usr/share/nginx/html-page
15
+
16
  # Copy backend server files and set permissions
17
  COPY build/ /app/build/
18
  COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
 
20
  COPY webgl-build /usr/share/nginx/html
21
  COPY html-page /usr/share/nginx/html-page
22
 
23
+ # Set ownership and permissions for Nginx directories
24
+ RUN chown -R www-data:www-data /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx/html /usr/share/nginx/html-page && \
25
+ chmod 755 /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx/html /usr/share/nginx/html-page
 
 
26
 
27
  # Copy and configure custom entrypoint script
28
  COPY entrypoint.sh /entrypoint.sh