Skip to content

Commit

Permalink
fix to allow docker production build
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfgebhardt committed Dec 7, 2023
1 parent 0357e77 commit 46938b6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
build/
coverage/
.vuepress/.temp/
.vuepress/.cache/
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"#test/*": ["./test/*"],
"#types/*": ["./src/graphql/types/*"]
},
"outDir": "./build/src",
"outDir": "./build",
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true
Expand Down

0 comments on commit 46938b6

Please sign in to comment.