Merge branch 'feat/endpoints-in-backend-om-eigen-leerpaden-en-leerobjecten-toe-te-voegen-aan-de-databank-#248' of https://github.com/SELab-2/Dwengo-1 into feat/endpoints-in-backend-om-eigen-leerpaden-en-leerobjecten-toe-te-voegen-aan-de-databank-#248
This commit is contained in:
commit
71b6e7006a
2 changed files with 13 additions and 6 deletions
|
@ -3,22 +3,28 @@ FROM node:22 AS build-stage
|
|||
# install simple http server for serving static content
|
||||
RUN npm install -g http-server
|
||||
|
||||
WORKDIR /app
|
||||
WORKDIR /app/dwengo
|
||||
|
||||
# Install dependencies
|
||||
|
||||
COPY package*.json ./
|
||||
COPY ./frontend/package.json ./frontend/
|
||||
# Frontend depends on common
|
||||
COPY common/package.json ./common/
|
||||
|
||||
RUN npm install --silent
|
||||
|
||||
# Build the frontend
|
||||
|
||||
# Root tsconfig.json
|
||||
COPY tsconfig.json ./
|
||||
COPY assets ./assets/
|
||||
COPY tsconfig.json tsconfig.build.json ./
|
||||
|
||||
WORKDIR /app/frontend
|
||||
COPY assets ./assets
|
||||
COPY common ./common
|
||||
|
||||
RUN npm run build --workspace=common
|
||||
|
||||
WORKDIR /app/dwengo/frontend
|
||||
|
||||
COPY frontend ./
|
||||
|
||||
|
@ -28,8 +34,8 @@ FROM nginx:stable AS production-stage
|
|||
|
||||
COPY config/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
COPY --from=build-stage /app/assets /usr/share/nginx/html/assets
|
||||
COPY --from=build-stage /app/frontend/dist /usr/share/nginx/html
|
||||
COPY --from=build-stage /app/dwengo/assets /usr/share/nginx/html/assets
|
||||
COPY --from=build-stage /app/dwengo/frontend/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ export default defineConfig({
|
|||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
"@dwengo-1/common": fileURLToPath(new URL("../common/src", import.meta.url)),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue