Skip to content

Commit

Permalink
update to apollo 4 and sentry 8 and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
swantzter committed Jun 22, 2024
1 parent 78de01d commit c95dbd6
Show file tree
Hide file tree
Showing 30 changed files with 10,186 additions and 6,889 deletions.
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/cloud-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
region: ${{ env.REGION }}
env_vars: SENTRY_DSN=${{ secrets.SENTRY_DSN }},GCP_PROJECT=${{ secrets.GCP_PROJECT }},APOLLO_KEY=${{ secrets.APOLLO_KEY }},APOLLO_GRAPH_ID=${{ secrets.APOLLO_GRAPH_ID }},APOLLO_GRAPH_VARIANT=current,APOLLO_SCHEMA_REPORTING=true,ALGOLIA_APP_ID=${{ secrets.ALGOLIA_APP_ID }},ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}
secrets: STRIPE_SK=${{ secrets.STRIPE_SK_SECRET }}
flags: --max-instances=1
flags: --max-instances=default --service-account=${{ secrets.CLOUD_RUN_SERVICE_ACCOUNT }}

- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM node:16-slim as base
FROM node:20-alpine as base

FROM base as runtime_deps
WORKDIR /src
COPY package.json .
COPY package-lock.json .
RUN npm ci --production
RUN npm ci --omit=dev

FROM runtime_deps as dev_deps
RUN npm ci

FROM dev_deps as builder
COPY . .
COPY codegen.yml tsconfig* ./
COPY src src
RUN npm run codegen
RUN npm run build

Expand All @@ -21,5 +22,5 @@ ENV GITHUB_SHA=${GITHUB_SHA}
ENV GITHUB_REF=${GITHUB_REF}
WORKDIR /app
COPY --from=runtime_deps /src/node_modules /app/node_modules
COPY --from=builder /src/dist /app/dist
CMD ["node", "dist/index.js"]
COPY --from=builder /src/dist /app
CMD ["node", "src/index.js"]
43 changes: 43 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import love from 'eslint-config-love'

const files = [
'src/*.js',
'src/*.ts',
'prisma/*.js',
'prisma/*.ts',
'*.mjs'
]

export default [
{
ignores: [
'node_modules/',
'dist/',
'.vscode/',
'**/generated',
'**/graphql.schema.json',
'**/local.settings.json',
]
},
{
...love,
files
},
{
files,
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/restrict-template-expressions': ['warn', {
allowNumber: true,
allowBoolean: true,
allowRegExp: true,
allowAny: true
}],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-this-alias': 'off',
'no-void': 'off',
'no-console': 'warn'
}
}
]
Loading

0 comments on commit c95dbd6

Please sign in to comment.