diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c7f3819 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules/ +build/ +coverage/ +.vuepress/.temp/ +.vuepress/.cache/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ae98ece..34669e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/package.json b/package.json index efc4cd6..aeb7795 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/tsconfig.json b/tsconfig.json index f432dcc..b25e006 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ "#test/*": ["./test/*"], "#types/*": ["./src/graphql/types/*"] }, - "outDir": "./build/src", + "outDir": "./build", "esModuleInterop": true, "strict": true, "skipLibCheck": true