2022-12-27 00:24:19 +01:00
|
|
|
FROM node:19-alpine
|
2022-05-15 15:22:06 +02:00
|
|
|
ARG NODE_ENV=production
|
2022-08-23 07:11:29 +02:00
|
|
|
WORKDIR /calckey
|
2018-10-09 08:09:50 +02:00
|
|
|
|
2022-08-08 05:32:59 +02:00
|
|
|
# Copy Files
|
2019-04-07 14:50:36 +02:00
|
|
|
COPY . ./
|
2021-09-04 19:18:12 +02:00
|
|
|
|
2022-08-08 05:32:59 +02:00
|
|
|
# Install Dependencies
|
|
|
|
RUN apk update
|
2022-12-10 04:18:45 +01:00
|
|
|
RUN apk add git ffmpeg tini alpine-sdk python3
|
2022-08-08 05:32:59 +02:00
|
|
|
|
2023-01-13 05:18:16 +01:00
|
|
|
# Configure corepack and pnpm
|
|
|
|
RUN npm i -g pnpm
|
|
|
|
RUN pnpm i --frozen-lockfile
|
|
|
|
ARG NODE_ENV=production
|
2022-08-08 05:32:59 +02:00
|
|
|
|
2022-12-27 00:24:19 +01:00
|
|
|
# Build project (pnp dependencies are installed)
|
2023-01-13 05:18:16 +01:00
|
|
|
RUN pnpm run build
|
2018-10-09 08:09:50 +02:00
|
|
|
|
2022-08-08 05:32:59 +02:00
|
|
|
# Remove git files
|
|
|
|
RUN rm -rf .git
|
2018-10-30 13:18:03 +01:00
|
|
|
|
2022-08-08 05:32:59 +02:00
|
|
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
2023-01-13 05:18:16 +01:00
|
|
|
CMD [ "pnpm", "run", "migrateandstart" ]
|