25 lines
453 B
Docker
25 lines
453 B
Docker
FROM node:18
|
|
WORKDIR /app
|
|
|
|
# Packages
|
|
COPY package*.json ./
|
|
RUN npm install -D
|
|
|
|
# Database schema
|
|
COPY schema.prisma .
|
|
RUN npx prisma generate
|
|
|
|
# Typescript compiling
|
|
COPY tsconfig.json .
|
|
COPY src ./src
|
|
COPY scripts ./scripts
|
|
RUN npx tsc
|
|
|
|
# Permissions for dist directory,
|
|
# so config.ts can be compiled there during runtime
|
|
# regardless of the user of the container
|
|
RUN chmod 777 dist
|
|
|
|
# Run the app
|
|
CMD ["node", "dist/src/index.js"]
|
|
STOPSIGNAL SIGINT
|