|
@ -3,6 +3,14 @@ FROM --platform=$BUILDPLATFORM node:20-slim AS builder |
|
|
# Build application and add additional files |
|
|
# Build application and add additional files |
|
|
WORKDIR /ghostfolio |
|
|
WORKDIR /ghostfolio |
|
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-suggests \ |
|
|
|
|
|
g++ \ |
|
|
|
|
|
git \ |
|
|
|
|
|
make \ |
|
|
|
|
|
openssl \ |
|
|
|
|
|
python3 \ |
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
# Only add basic files without the application itself to avoid rebuilding |
|
|
# Only add basic files without the application itself to avoid rebuilding |
|
|
# layers when files (package.json etc.) have not changed |
|
|
# layers when files (package.json etc.) have not changed |
|
|
COPY ./CHANGELOG.md CHANGELOG.md |
|
|
COPY ./CHANGELOG.md CHANGELOG.md |
|
@ -11,13 +19,6 @@ COPY ./package.json package.json |
|
|
COPY ./package-lock.json package-lock.json |
|
|
COPY ./package-lock.json package-lock.json |
|
|
COPY ./prisma/schema.prisma prisma/schema.prisma |
|
|
COPY ./prisma/schema.prisma prisma/schema.prisma |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-suggests \ |
|
|
|
|
|
g++ \ |
|
|
|
|
|
git \ |
|
|
|
|
|
make \ |
|
|
|
|
|
openssl \ |
|
|
|
|
|
python3 \ |
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN npm install |
|
|
RUN npm install |
|
|
|
|
|
|
|
|
# See https://github.com/nrwl/nx/issues/6586 for further details |
|
|
# See https://github.com/nrwl/nx/issues/6586 for further details |
|
@ -58,9 +59,8 @@ RUN apt-get update && apt-get install -y --no-install-suggests \ |
|
|
openssl \ |
|
|
openssl \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps |
|
|
COPY --chown=node:node --from=builder /ghostfolio/dist/apps /ghostfolio/apps |
|
|
COPY ./docker/entrypoint.sh /ghostfolio/entrypoint.sh |
|
|
COPY --chown=node:node ./docker/entrypoint.sh /ghostfolio/entrypoint.sh |
|
|
RUN chown -R node:node /ghostfolio |
|
|
|
|
|
WORKDIR /ghostfolio/apps/api |
|
|
WORKDIR /ghostfolio/apps/api |
|
|
EXPOSE ${PORT:-3333} |
|
|
EXPOSE ${PORT:-3333} |
|
|
USER node |
|
|
USER node |
|
|