mirror of
https://github.com/r-ca/kidshift-be.git
synced 2024-10-25 16:14:02 +00:00
26 lines
504 B
Docker
26 lines
504 B
Docker
FROM node:18-alpine
|
|
|
|
# Set working directory
|
|
WORKDIR /usr/src/kidshift
|
|
|
|
# Copy package files and install dependencies
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
|
|
# Copy Prisma files and generate Prisma client
|
|
COPY prisma ./prisma/
|
|
RUN npx prisma generate
|
|
|
|
# Copy the rest of the application code and build the project
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Set environment variables if necessary
|
|
ENV NODE_ENV=production
|
|
|
|
# Expose the application port
|
|
EXPOSE 3000
|
|
|
|
# Command to run the application
|
|
CMD ["npm", "start"]
|