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