|
|
@ -33,19 +33,20 @@ COPY ./nx.json nx.json |
|
|
|
COPY ./replace.build.mjs replace.build.mjs |
|
|
|
COPY ./tsconfig.base.json tsconfig.base.json |
|
|
|
|
|
|
|
RUN npm run build:production |
|
|
|
# Update build command for Nx 21 |
|
|
|
RUN npx nx run-many --target=build --projects=api,client --configuration=production |
|
|
|
|
|
|
|
# Prepare the dist image with additional node_modules |
|
|
|
WORKDIR /ghostfolio/dist/apps/api |
|
|
|
# package.json was generated by the build process, however the original |
|
|
|
# package-lock.json needs to be used to ensure the same versions |
|
|
|
# package-lock.json needs to be used to ensure the same versions |
|
|
|
COPY ./package-lock.json /ghostfolio/dist/apps/api/package-lock.json |
|
|
|
|
|
|
|
RUN npm install |
|
|
|
COPY prisma /ghostfolio/dist/apps/api/prisma |
|
|
|
|
|
|
|
# Overwrite the generated package.json with the original one to ensure having |
|
|
|
# all the scripts |
|
|
|
# all the scripts |
|
|
|
COPY package.json /ghostfolio/dist/apps/api |
|
|
|
RUN npm run database:generate-typings |
|
|
|
|
|
|
@ -61,6 +62,8 @@ RUN apt-get update && apt-get install -y --no-install-suggests \ |
|
|
|
|
|
|
|
COPY --chown=node:node --from=builder /ghostfolio/dist/apps /ghostfolio/apps |
|
|
|
COPY --chown=node:node ./docker/entrypoint.sh /ghostfolio/entrypoint.sh |
|
|
|
RUN chmod +x /ghostfolio/entrypoint.sh |
|
|
|
|
|
|
|
WORKDIR /ghostfolio/apps/api |
|
|
|
EXPOSE ${PORT:-3333} |
|
|
|
USER node |
|
|
|