2022-12-27 00:24:19 +01:00
|
|
|
FROM node:19-alpine
|
2022-05-15 22:22:06 +09:00
|
|
|
ARG NODE_ENV=production
|
2022-08-22 22:11:29 -07:00
|
|
|
WORKDIR /calckey
|
2018-10-09 15:09:50 +09:00
|
|
|
|
2022-08-08 05:32:59 +02:00
|
|
|
# Copy Files
|
2019-04-07 21:50:36 +09:00
|
|
|
COPY . ./
|
2021-09-05 02:18:12 +09:00
|
|
|
|
2022-08-08 05:32:59 +02: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 05:32:59 +02:00
|
|
|
|
2023-01-13 04:18:16 +00:00
|
|
|
# Configure corepack and pnpm
|
2023-01-12 20:54:33 -08: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 05:32:59 +02:00
|
|
|
|
2022-12-27 00:24:19 +01:00
|
|
|
# Build project (pnp dependencies are installed)
|
2023-01-13 04:18:16 +00:00
|
|
|
RUN pnpm run build
|
2018-10-09 15:09:50 +09:00
|
|
|
|
2022-08-08 05:32:59 +02:00
|
|
|
# Remove git files
|
|
|
|
RUN rm -rf .git
|
2018-10-30 21:18:03 +09:00
|
|
|
|
2022-08-08 05:32:59 +02:00
|
|
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
2023-01-13 04:18:16 +00:00
|
|
|
CMD [ "pnpm", "run", "migrateandstart" ]
|