-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
_media | ||
.ffmpeg | ||
.coverage | ||
deploy | ||
dist | ||
node_modules | ||
pouch__all_dbs__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
FROM node:18 | ||
FROM node:18 AS builder | ||
WORKDIR /usr/src/app | ||
ENV NODE_ENV production | ||
ENV PATHS__FFMPEG ffmpeg | ||
ENV PATHS__FFPROBE ffmpeg | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN sed -i -e 's/^ "version": "[0-9.]\+",$//' package.json | ||
RUN yarn install && \ | ||
apt-get update && \ | ||
apt-get install ffmpeg -y | ||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
RUN sed -i -e 's/^ "version": "[0-9.]\+",$//' package.json | ||
RUN corepack enable | ||
|
||
COPY ./src ./src | ||
COPY tsconfig.build.json ./ | ||
|
||
RUN yarn install | ||
RUN yarn build:ts | ||
|
||
RUN sed -i -e 's/^ "postinstall": "husky",$//' package.json | ||
RUN yarn workspaces focus --production | ||
|
||
FROM node:18 | ||
WORKDIR /usr/src/app | ||
ENV NODE_ENV=production | ||
ENV PATHS__FFMPEG=ffmpeg | ||
ENV PATHS__FFPROBE=ffmpeg | ||
|
||
RUN apt-get update && \ | ||
apt-get install ffmpeg -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
CMD [ "node", "src" ] | ||
COPY --from=builder /usr/src/app/package.json ./ | ||
COPY --from=builder /usr/src/app/dist ./dist | ||
COPY --from=builder /usr/src/app/node_modules ./node_modules | ||
|
||
CMD [ "node", "dist" ] | ||
HEALTHCHECK CMD curl -f http://localhost:8000/healthcheck || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters