Spaces:
Build error
Build error
Update Dockerfile
Browse files- 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 |
-
#
|
| 21 |
-
RUN
|
| 22 |
-
|
| 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
|