fix: Missing modules (?)

This commit is contained in:
Tibo De Peuter 2025-04-01 21:09:19 +02:00
parent 358dcb07e0
commit 2866894707
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
8 changed files with 27 additions and 22 deletions

View file

@ -1,6 +1,8 @@
FROM node:22 AS build-stage
FROM node:22
WORKDIR /app
WORKDIR /app/dwengo
COPY ./backend/i18n ./i18n
# Install dependencies
@ -19,22 +21,9 @@ COPY backend ./backend
COPY common ./common
COPY docs ./docs
WORKDIR /app/backend
RUN npm run build
FROM node:22 AS production-stage
WORKDIR /app
COPY package-lock.json backend/package.json ./
RUN npm install --silent --only=production
COPY ./docs /docs
COPY ./backend/i18n /app/i18n
COPY --from=build-stage /app/backend/dist ./dist/
RUN npm run build --workspace=common
RUN npm run build --workspace=backend
EXPOSE 3000
CMD ["node", "--env-file=.env", "dist/app.js"]
CMD ["node", "--env-file=/app/dwengo/backend/.env", "/app/dwengo/backend/dist/app.js"]

View file

@ -24,6 +24,7 @@
"cross": "^1.0.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.7",
"dwengo-1-common": "^0.1.1",
"express": "^5.0.1",
"express-jwt": "^8.5.1",
"gift-pegjs": "^1.0.2",

View file

@ -4,6 +4,8 @@
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"resolveJsonModule": true
"resolveJsonModule": true,
"sourceMap": true,
"composite": true
}
}

View file

@ -5,8 +5,12 @@
"private": true,
"type": "module",
"scripts": {
"build": "tsc --project tsconfig.json",
"format": "prettier --write src/",
"format-check": "prettier --check src/",
"lint": "eslint . --fix"
},
"exports": {
"./src/*": "./dist/*"
}
}

View file

@ -4,6 +4,8 @@
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"resolveJsonModule": true
"resolveJsonModule": true,
"sourceMap": true,
"composite": true
}
}

1
package-lock.json generated
View file

@ -41,6 +41,7 @@
"cross": "^1.0.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.7",
"dwengo-1-common": "^0.1.1",
"express": "^5.0.1",
"express-jwt": "^8.5.1",
"gift-pegjs": "^1.0.2",

View file

@ -5,7 +5,7 @@
"private": true,
"type": "module",
"scripts": {
"build": "npm run build --workspace=backend --workspace=frontend",
"build": "npm run build --workspaces --if-present",
"format": "npm run format --workspace=backend --workspace=common --workspace=frontend",
"format-check": "npm run format-check --workspace=backend --workspace=common --workspace=frontend",
"lint": "npm run lint --workspace=backend --workspace=common --workspace=frontend",

View file

@ -121,5 +121,11 @@
"skipLibCheck": true,
/* Skip type checking all .d.ts files. */
"resolveJsonModule": true
}
},
"files": [],
"references": [
{ "path": "backend" },
{ "path": "common" },
{ "path": "frontend" }
]
}