Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
axelrindle committed Sep 8, 2024
1 parent 51f3315 commit 4b5d805
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:20-alpine3.17 AS workspace-base

ENV CI=true
ENV HUSKY=0

Expand All @@ -14,28 +15,28 @@ COPY vendor/ ./vendor/

COPY package*.json ./

RUN npm ci
COPY . ./
RUN npm ci
RUN npm run postinstall --workspace ./api

ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ARG commitHash
ENV COMMIT_HASH $commitHash
ENV COMMIT_HASH=$commitHash
ARG version
ENV VERSION $version
ENV VERSION=$version

FROM api-build-stage as api-production-stage
FROM api-build-stage AS api-production-stage

CMD [ "npm", "start", "-w", "./api"]

FROM workspace-base as frontend-build-stage
ARG tenant
ENV VITE_APP_COMMIT_HASH $commitHash
ENV VITE_APP_VERSION $version
FROM workspace-base AS frontend-build-stage

ENV VITE_APP_COMMIT_HASH=$commitHash
ENV VITE_APP_VERSION=$version
RUN npm run build --workspace ./frontend

FROM workspace-base as api-build-stage
FROM workspace-base AS api-build-stage

# todo packing
# RUN npm run build --workspace ./api
Expand Down

0 comments on commit 4b5d805

Please sign in to comment.