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