Last active
September 13, 2022 18:01
-
-
Save raiyansarker/54cc1529207369acd716ce59fda82dda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:16-slim AS builder | |
WORKDIR /app | |
COPY package.json . | |
COPY yarn.lock . | |
COPY prisma ./prisma/ | |
RUN yarn install | |
COPY . . | |
RUN yarn build | |
FROM node:alpine AS production | |
COPY --from=builder /app/node_modules ./node_modules | |
COPY --from=builder /app/package.json ./ | |
COPY --from=builder /app/yarn.lock ./ | |
COPY --from=builder /app/build ./build | |
COPY --from=builder /app/prisma ./prisma | |
ENTRYPOINT [ "yarn", "start:prod" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[+] Building 9.9s (14/19) | |
=> [internal] load build definition from Dockerfile 0.0s | |
=> => transferring dockerfile: 37B 0.0s | |
=> [internal] load .dockerignore 0.0s | |
=> => transferring context: 34B 0.0s | |
=> [internal] load metadata for docker.io/library/node:16-slim 0.0s | |
=> [internal] load metadata for docker.io/library/node:alpine 0.0s | |
=> [builder 1/8] FROM docker.io/library/node:16-slim 0.0s | |
=> [internal] load build context 0.1s | |
=> => transferring context: 36.17kB 0.0s | |
=> CACHED [production 1/6] FROM docker.io/library/node:alpine 0.0s | |
=> CACHED [builder 2/8] WORKDIR /app 0.0s | |
=> CACHED [builder 3/8] COPY package.json . 0.0s | |
=> CACHED [builder 4/8] COPY yarn.lock . 0.0s | |
=> CACHED [builder 5/8] COPY prisma ./prisma/ 0.0s | |
=> CACHED [builder 6/8] RUN yarn install 0.0s | |
=> CACHED [builder 7/8] COPY . . 0.0s | |
=> ERROR [builder 8/8] RUN yarn build 9.7s | |
------ | |
> [builder 8/8] RUN yarn build: | |
#14 0.326 yarn run v1.22.19 | |
#14 0.354 $ tsc -p . | |
#14 9.478 src/Post/post.constroller.ts(120,13): error TS7006: Parameter 'error' implicitly has an 'any' type. | |
#14 9.478 src/auth/createOrUpdateUser.ts(4,10): error TS2305: Module '"@prisma/client"' has no exported member 'Provider'. | |
#14 9.479 src/auth/createOrUpdateUser.ts(4,20): error TS2305: Module '"@prisma/client"' has no exported member 'Role'. | |
#14 9.479 src/auth/index.ts(6,10): error TS2305: Module '"@prisma/client"' has no exported member 'Provider'. | |
#14 9.479 src/auth/sign.ts(4,10): error TS2305: Module '"@prisma/client"' has no exported member 'Role'. | |
#14 9.479 src/helper/auth/anyUser.ts(1,10): error TS2305: Module '"@prisma/client"' has no exported member 'Role'. | |
#14 9.479 src/helper/auth/authenticatedUser.ts(1,10): error TS2305: Module '"@prisma/client"' has no exported member 'Role'. | |
#14 9.479 src/helper/auth/authorOrAdminUser.ts(1,10): error TS2305: Module '"@prisma/client"' has no exported member 'Role'. | |
#14 9.479 src/helper/auth/authorUser.ts(1,10): error TS2305: Module '"@prisma/client"' has no exported member 'Role'. | |
#14 9.666 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. | |
#14 9.666 error Command failed with exit code 2. | |
------ | |
executor failed running [/bin/sh -c yarn build]: exit code: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Secret", | |
"version": "1.0.0", | |
"description": "Backend App", | |
"scripts": { | |
"start": "NODE_ENV=production node ./build/index.js", | |
"start:prod": "yarn prisma migrate deploy && yarn prisma generate && yarn start", | |
"build": "tsc -p .", | |
"dev": "nodemon src/index.ts" | |
}, | |
"main": "src/index.ts", | |
"license": "MIT", | |
"private": true, | |
"devDependencies": { | |
"@types/express": "^4.17.13", | |
"@types/jsonwebtoken": "^8.5.9", | |
"@types/morgan": "^1.9.3", | |
"@types/ms": "^0.7.31", | |
"@types/node": "^18.7.16", | |
"nodemon": "^2.0.19", | |
"prettier": "^2.7.1", | |
"prisma": "^4.3.1", | |
"ts-node": "^10.9.1", | |
"typescript": "^4.8.2" | |
}, | |
"dependencies": { | |
"@graphql-tools/merge": "^8.3.5", | |
"@prisma/client": "4.3.1", | |
"apollo-server-core": "^3.10.2", | |
"apollo-server-express": "^3.10.2", | |
"axios": "^0.27.2", | |
"cors": "^2.8.5", | |
"dotenv": "^16.0.2", | |
"express": "^4.18.1", | |
"googleapis": "^107.0.0", | |
"graphql": "^16.6.0", | |
"ioredis": "^5.2.3", | |
"jsonwebtoken": "^8.5.1", | |
"morgan": "^1.10.0", | |
"ms": "^2.1.3", | |
"slugify": "^1.6.5", | |
"winston": "^3.8.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment