Skip to content

Commit

Permalink
build(docker): update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Ar Rakin <rakinar2@onesoftnet.eu.org>
  • Loading branch information
virtual-designer committed Jul 8, 2024
1 parent 086df82 commit 5db7b3f
Show file tree
Hide file tree
Showing 4 changed files with 2,207 additions and 1,886 deletions.
27 changes: 18 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@ FROM node:22-alpine

WORKDIR /app

RUN apk add --no-cache python3 build-base g++ cairo-dev jpeg-dev pango-dev giflib-dev
RUN apk add --no-cache python3 build-base g++ cairo-dev jpeg-dev pango-dev giflib-dev bash

COPY .env.docke[r] ./.env
COPY package.json .
RUN npm install -D

COPY tsconfig.json .
COPY src ./src
COPY resources ./resources
COPY ecosystem.config.js .
COPY blazew .
COPY blaze .
COPY blazebuild .
COPY build.blaze.ts
COPY build_src .
COPY eslint.config.mjs .

RUN npm run build
RUN bash blazew build

FROM node:22-alpine

# -- Uncomment the following line if you want a smaller image size
# RUN npm prune --production
WORKDIR /app

COPY --from=0 /app/node_modules ./node_modules
COPY --from=0 /app/build ./build
COPY --from=0 /app/package.json .
COPY ecosystem.config.js .
COPY .env.docke[r] ./.env
COPY config ./config

EXPOSE 4000
CMD ["npm", "run", "start:prod", "--", "--no-daemon"]
Loading

0 comments on commit 5db7b3f

Please sign in to comment.