github-actions[bot] commited on
Commit ·
90230b2
1
Parent(s): 2a7936b
Deploy Backend from GitHub Actions Commit: 5d798ac013c4f49d4d351e0deea2f3916bde69d6
Browse files- Dockerfile +2 -9
Dockerfile
CHANGED
|
@@ -5,18 +5,14 @@ WORKDIR /app
|
|
| 5 |
# Install openssl for Prisma compatibility
|
| 6 |
RUN apk add --no-cache openssl curl
|
| 7 |
|
| 8 |
-
# Hugging Face Spaces requires the container to run as a non-root user with UID 1000.
|
| 9 |
-
# The node:22-alpine image already has a 'node' user with UID 1000.
|
| 10 |
-
# We change ownership of the copied files so the node user can access them.
|
| 11 |
-
|
| 12 |
# Copy dependencies manifest
|
| 13 |
-
COPY
|
| 14 |
|
| 15 |
# Install packages
|
| 16 |
RUN npm ci
|
| 17 |
|
| 18 |
# Copy code
|
| 19 |
-
COPY
|
| 20 |
|
| 21 |
# Generate Prisma client
|
| 22 |
RUN npx prisma generate
|
|
@@ -24,9 +20,6 @@ RUN npx prisma generate
|
|
| 24 |
# Build typescript compilation
|
| 25 |
RUN npm run build
|
| 26 |
|
| 27 |
-
# Switch to non-root user
|
| 28 |
-
USER node
|
| 29 |
-
|
| 30 |
ENV PORT=7860
|
| 31 |
EXPOSE 7860
|
| 32 |
|
|
|
|
| 5 |
# Install openssl for Prisma compatibility
|
| 6 |
RUN apk add --no-cache openssl curl
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# Copy dependencies manifest
|
| 9 |
+
COPY package*.json ./
|
| 10 |
|
| 11 |
# Install packages
|
| 12 |
RUN npm ci
|
| 13 |
|
| 14 |
# Copy code
|
| 15 |
+
COPY . .
|
| 16 |
|
| 17 |
# Generate Prisma client
|
| 18 |
RUN npx prisma generate
|
|
|
|
| 20 |
# Build typescript compilation
|
| 21 |
RUN npm run build
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
ENV PORT=7860
|
| 24 |
EXPOSE 7860
|
| 25 |
|