Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): add sourcemaps in core #47

Merged
merged 1 commit into from
Sep 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore(core): add sourcemaps in core
  • Loading branch information
tericcabrel committed Sep 4, 2022
commit fdff8e653e6d5c19369f71ac5fb61cc31e28e080
1 change: 1 addition & 0 deletions .github/workflows/deploy-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- dev
paths:
- 'apps/core/src/**'
- 'apps/core/Dockerfile'

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
3 changes: 2 additions & 1 deletion apps/core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ ENV NODE_ENV=production
WORKDIR /app

COPY --chown=node:node --from=builder /app/apps/core/build/index.js ./
COPY --chown=node:node --from=builder /app/apps/core/build/index.js.map ./
COPY --chown=node:node --from=schema-builder /app/node_modules/.prisma/client/schema.prisma ./
COPY --chown=node:node --from=schema-builder /app/node_modules/.prisma/client/libquery_engine-linux-musl.so.node ./

RUN yarn init -y

EXPOSE 7501

CMD ["node", "index.js"]
CMD ["node", "--enable-source-maps", "index.js"]
2 changes: 1 addition & 1 deletion apps/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "rm -rf .turbo dist build logs",
"dev": "nodemon --watch \"*.ts\" --exec \"ts-node\" ./src/index.ts",
"lint": "eslint src",
"build:prod": "esbuild ./src/index.ts --bundle --platform=node --outfile=build/index.js",
"build:prod": "esbuild ./src/index.ts --bundle --sourcemap --platform=node --outfile=build/index.js",
"test": "jest",
"gql:gen:types": "yarn graphql-codegen"
},
Expand Down
1 change: 1 addition & 0 deletions apps/core/src/server/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const startGraphqlServer = async (expressApplication: Application, httpSe
});

const apolloServer = new ApolloServer({
cache: 'bounded',
context: async ({ req, res }): Promise<AppContext> => buildGraphQLContext(req, res),
debug: env.IS_DEV,
introspection: env.ENABLE_INTROSPECTION,
Expand Down