0
0
docker-images/dockerfiles/offtiktokapi.Dockerfile

31 lines
544 B
Docker
Raw Normal View History

2024-08-08 21:33:09 +08:00
# Use an official Node.js LTS base image
FROM node:slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
openssl
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Create app directory
WORKDIR /usr/src/app
# Copy project files
COPY . .
# Install project dependencies
RUN npm install
# Build the project
RUN npx prisma generate && npx prisma migrate dev
RUN npx tsc --noEmit
# Expose the port the app runs on
EXPOSE 2000
# Define the command to run the application
CMD ["npm", "run", "start"]