Skip to content

Commit

Permalink
Fix: I dont even know
Browse files Browse the repository at this point in the history
  • Loading branch information
Its4Nik committed Jan 8, 2025
1 parent 8c9688b commit 5951b0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions docker/Dockerfile-base
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"
Expand All @@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5951b0b

Please sign in to comment.