fix to allow docker production build

This commit is contained in:
Ulf Gebhardt 2023-12-07 20:36:47 +01:00
parent 0357e77d65
commit 46938b6ad0
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
4 changed files with 10 additions and 5 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
node_modules/
build/
coverage/
.vuepress/.temp/
.vuepress/.cache/

View File

@ -72,8 +72,8 @@ FROM base as build
# Copy everything
COPY . .
# npm install
RUN npm install --frozen-lockfile --non-interactive
# npm install including dev dependencies to be able to compile
RUN npm install --include=dev --frozen-lockfile --non-interactive
# npm build
RUN npm run build

View File

@ -16,7 +16,7 @@
},
"scripts": {
"build": "tsc",
"start": "npm run build && TZ=UTC TS_NODE_BASEURL=./build node -r tsconfig-paths/register build/src/index.js",
"start": "TZ=UTC TS_NODE_BASEURL=./build node -r tsconfig-paths/register build/src/index.js",
"dev": "TZ=UTC nodemon -w src --ext ts,json --exec ts-node -r tsconfig-paths/register src/index.ts",
"db:migrate": "TZ=UTC npx prisma migrate dev",
"db:reset": "TZ=UTC npx prisma migrate reset --force",
@ -40,6 +40,7 @@
"graphql-scalars": "^1.22.4",
"prisma": "^5.6.0",
"reflect-metadata": "^0.1.13",
"tsconfig-paths": "^4.2.0",
"type-graphql": "^2.0.0-beta.3"
},
"devDependencies": {
@ -70,7 +71,6 @@
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsc-watch": "^6.0.4",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.3.2",
"vuepress": "^2.0.0-rc.0"
},

View File

@ -13,7 +13,7 @@
"#test/*": ["./test/*"],
"#types/*": ["./src/graphql/types/*"]
},
"outDir": "./build/src",
"outDir": "./build",
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true