fix: docker permission.
Some checks failed
Build and Push Docker Image / buildx (push) Has been cancelled
Some checks failed
Build and Push Docker Image / buildx (push) Has been cancelled
This commit is contained in:
@@ -11,6 +11,9 @@ FROM base AS production
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
# Create directory for database with proper permissions
|
||||
RUN mkdir -p /app/data && chown -R 1001:1001 /app/data
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# Create a non-root user
|
||||
@@ -19,4 +22,7 @@ RUN adduser -S nextjs -u 1001
|
||||
|
||||
USER nextjs
|
||||
|
||||
# Set environment variable for database path
|
||||
ENV DB_PATH=/app/data/data.db
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
Reference in New Issue
Block a user