Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
@@ -26,15 +26,16 @@ COPY ./backend ./backend
|
|
26 |
RUN pip install -r ./backend/requirements.txt
|
27 |
|
28 |
# Step #3: Configure nginx and flask
|
29 |
-
COPY --from=build-step /app/frontend/build /
|
30 |
COPY deployment/docker/nginx.conf /etc/nginx/sites-enabled/default
|
31 |
COPY deployment/docker/serve.sh .
|
32 |
RUN chmod +x ./serve.sh
|
33 |
|
34 |
# Ensure nginx can write to necessary directories
|
35 |
-
RUN mkdir -p /
|
36 |
-
&& touch /
|
37 |
-
&&
|
|
|
38 |
|
39 |
# Remove the user directive if present
|
40 |
RUN sed -i '/^user /d' /etc/nginx/nginx.conf
|
|
|
26 |
RUN pip install -r ./backend/requirements.txt
|
27 |
|
28 |
# Step #3: Configure nginx and flask
|
29 |
+
COPY --from=build-step /app/frontend/build /var/www/html
|
30 |
COPY deployment/docker/nginx.conf /etc/nginx/sites-enabled/default
|
31 |
COPY deployment/docker/serve.sh .
|
32 |
RUN chmod +x ./serve.sh
|
33 |
|
34 |
# Ensure nginx can write to necessary directories
|
35 |
+
RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/proxy /var/lib/nginx/fastcgi /var/lib/nginx/uwsgi /var/lib/nginx/scgi /var/log/nginx /var/www/html \
|
36 |
+
&& touch /var/log/nginx/error.log /var/log/nginx/access.log \
|
37 |
+
&& chown -R www-data:www-data /var/lib/nginx /var/log/nginx /var/www/html \
|
38 |
+
&& chmod -R 755 /var/lib/nginx /var/log/nginx /var/www/html
|
39 |
|
40 |
# Remove the user directive if present
|
41 |
RUN sed -i '/^user /d' /etc/nginx/nginx.conf
|