Spaces:
Paused
Paused
Create Dockerfile
Browse files12345678910111213141516171819202122232425262728293031FROM node:18-alpine
# Install gitRUN apk add --no-cache git
# Clone repoRUN git clone https://github.com/Kingdavid102/fedex.git /app
# Set working directoryWORKDIR /app
# Install dependenciesRUN npm install
# Create uploads & products.json inside /app with correct permissionsRUN mkdir -p /app/uploads && \ touch /app/products.json && \ chown -R node:node /app && \ chmod -R 755 /app/uploads && \ chmod 644 /app/products.json
# Switch to non-root userUSER node
# Environment variablesENV PORT=7860ENV NODE_ENV=production
EXPOSE 7860
CMD ["node", "server.js"]DockerfileAdded+31