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