-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
9 additions
and
7 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Stage 1: Build stage | ||
FROM node:alpine AS builder | ||
FROM node:23-alpine AS builder | ||
|
||
LABEL maintainer="https://github.com/its4nik" | ||
LABEL version="2.0.1" | ||
|
@@ -20,16 +20,17 @@ RUN apk add --update --no-cache bash python3 && \ | |
|
||
COPY tsconfig.json environment.d.ts package*.json ./ | ||
|
||
RUN npm install -g [email protected] && \ | ||
npm install | ||
RUN npm --python="$(which python3)" \ | ||
install -g [email protected] && \ | ||
npm ci | ||
|
||
COPY ./src ./src | ||
RUN mv ./src/sample-variable.json ./src/data/variables.json | ||
RUN mkdir -p ./dist/src/config | ||
RUN npm run build:mini | ||
|
||
# Stage 2: Production stage | ||
FROM node:alpine AS production | ||
FROM node:23-alpine AS production | ||
|
||
WORKDIR /api | ||
|
||
|
@@ -42,7 +43,8 @@ HEALTHCHECK --interval=5m --timeout=3s \ | |
COPY --chown=dockstatapi:dockstatapi --from=builder /app/dist/ /api/src | ||
COPY --chown=dockstatapi:dockstatapi --from=builder /app/package*.json /api/ | ||
|
||
RUN npm install --omit=dev | ||
RUN npm --python="$(which python3)" \ | ||
ci --omit=dev | ||
|
||
COPY --chown=dockstatapi:dockstatapi --from=builder /app/src/misc/entrypoint.sh /api/entrypoint.sh | ||
COPY --chown=dockstatapi:dockstatapi --from=builder /app/src/misc/createEnvFile.sh /api/createEnvFile.sh | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ COPY tsconfig.json environment.d.ts package*.json ./ | |
|
||
RUN npm --python="$(which python3)" \ | ||
install -g [email protected] && \ | ||
npm install | ||
npm ci | ||
|
||
COPY ./src ./src | ||
RUN mv ./src/sample-variable.json ./src/data/variables.json | ||
|
@@ -40,7 +40,7 @@ RUN apk add --no-cache bash curl && \ | |
COPY --chown=dockstatapi:dockstatapi --from=builder /app/package*.json /api/ | ||
|
||
RUN npm --python="$(which python3)" \ | ||
install --omit=dev | ||
ci --omit=dev | ||
|
||
COPY --chown=dockstatapi:dockstatapi --from=builder /app/dist/ /api/src | ||
COPY --chown=dockstatapi:dockstatapi --from=builder /app/src/misc/entrypoint.sh /api/entrypoint.sh | ||
|