Merge pull request #2 from IT4Change/docker-production

fix(docker): fix docker production build
This commit is contained in:
Ulf Gebhardt 2023-12-07 20:43:36 +01:00 committed by GitHub
commit 8d8c7da8c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 everything
COPY . . COPY . .
# npm install # npm install including dev dependencies to be able to compile
RUN npm install --frozen-lockfile --non-interactive RUN npm install --include=dev --frozen-lockfile --non-interactive
# npm build # npm build
RUN npm run build RUN npm run build

View File

@ -16,7 +16,7 @@
}, },
"scripts": { "scripts": {
"build": "tsc", "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", "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:migrate": "TZ=UTC npx prisma migrate dev",
"db:reset": "TZ=UTC npx prisma migrate reset --force", "db:reset": "TZ=UTC npx prisma migrate reset --force",
@ -40,6 +40,7 @@
"graphql-scalars": "^1.22.4", "graphql-scalars": "^1.22.4",
"prisma": "^5.6.0", "prisma": "^5.6.0",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"tsconfig-paths": "^4.2.0",
"type-graphql": "^2.0.0-beta.3" "type-graphql": "^2.0.0-beta.3"
}, },
"devDependencies": { "devDependencies": {
@ -70,7 +71,6 @@
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"tsc-watch": "^6.0.4", "tsc-watch": "^6.0.4",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.3.2", "typescript": "^5.3.2",
"vuepress": "^2.0.0-rc.0" "vuepress": "^2.0.0-rc.0"
}, },

View File

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