2023-09-18 11:26:37 +02:00
|
|
|
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
|
2023-09-30 12:31:25 +02:00
|
|
|
COPY scripts ./scripts
|
2023-09-18 11:26:37 +02:00
|
|
|
RUN npx tsc
|
|
|
|
|
2024-04-24 02:38:52 +02:00
|
|
|
# Permissions for dist directory,
|
|
|
|
# so config.ts can be compiled there during runtime
|
|
|
|
# regardless of the user of the container
|
|
|
|
RUN chmod 777 dist
|
|
|
|
|
2023-09-18 11:26:37 +02:00
|
|
|
# Run the app
|
2023-09-21 20:43:43 +02:00
|
|
|
CMD ["node", "dist/src/index.js"]
|
2023-12-13 19:48:30 +01:00
|
|
|
STOPSIGNAL SIGINT
|