Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
|
@@ -27,6 +27,12 @@ RUN pip3 install --no-cache-dir -r backend/python/requirements.txt
|
|
| 27 |
# Copy the rest of the application source code into the container.
|
| 28 |
COPY . .
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
# --- Build the React Frontend ---
|
| 31 |
# This runs the memory-efficient build script from web/package.json
|
| 32 |
# and creates the production build in /app/web/build
|
|
|
|
| 27 |
# Copy the rest of the application source code into the container.
|
| 28 |
COPY . .
|
| 29 |
|
| 30 |
+
# --- Create Runtime Directories & Set Permissions ---
|
| 31 |
+
# Create directories that the application needs to write to at runtime.
|
| 32 |
+
# Then, change their ownership to the non-root 'node' user so the app has write access.
|
| 33 |
+
RUN mkdir -p /app/backend/uploads /app/backend/temp /app/backend/results /app/backend/database && \
|
| 34 |
+
chown -R node:node /app/backend/uploads /app/backend/temp /app/backend/results /app/backend/database
|
| 35 |
+
|
| 36 |
# --- Build the React Frontend ---
|
| 37 |
# This runs the memory-efficient build script from web/package.json
|
| 38 |
# and creates the production build in /app/web/build
|