Peiyan commited on
Commit
8391eb5
·
verified ·
1 Parent(s): dca2fa6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -31,8 +31,13 @@ RUN pip install -r ./backend/requirements.txt
31
  # Ensure necessary permissions and create directories
32
  RUN mkdir -p /var/log/nginx && \
33
  touch /var/log/nginx/error.log && \
34
- chmod -R 755 /var/log/nginx && \
35
- chown -R root:root /var/log/nginx
 
 
 
 
 
36
 
37
  # Step #3: configure nginx and flask
38
  COPY --from=build-step /app/frontend/build /usr/share/nginx/html
@@ -40,6 +45,7 @@ COPY deployment/docker/nginx.conf /etc/nginx/nginx.conf
40
  COPY deployment/docker/serve.sh /serve.sh
41
  RUN chmod a+x /serve.sh
42
 
 
43
  # Expose port 80
44
  EXPOSE 80
45
 
 
31
  # Ensure necessary permissions and create directories
32
  RUN mkdir -p /var/log/nginx && \
33
  touch /var/log/nginx/error.log && \
34
+ touch /var/log/nginx/access.log && \
35
+ chmod -R 777 /var/log/nginx && \
36
+ chown -R root:root /var/log/nginx && \
37
+ chmod -R 777 /var/lib/nginx && \
38
+ chown -R root:root /var/lib/nginx && \
39
+ chmod -R 777 /usr/share/nginx/html && \
40
+ chown -R root:root /usr/share/nginx/html
41
 
42
  # Step #3: configure nginx and flask
43
  COPY --from=build-step /app/frontend/build /usr/share/nginx/html
 
45
  COPY deployment/docker/serve.sh /serve.sh
46
  RUN chmod a+x /serve.sh
47
 
48
+
49
  # Expose port 80
50
  EXPOSE 80
51