File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868 id : docker_build
6969 uses : docker/build-push-action@v6
7070 with :
71- context : packages/fastify-app
7271 push : true
7372 tags : supabase/stripe-sync-engine:latest,supabase/stripe-sync-engine:v${{ needs.release.outputs.new-release-version }}
7473 platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ FROM node:22-alpine
44RUN npm install -g pnpm@10.10.0
55
66WORKDIR /app
7- COPY package.json pnpm-lock.yaml ./
7+ COPY . ./
88RUN pnpm install --frozen-lockfile
9- COPY . /app
109RUN pnpm build
1110RUN pnpm prune --production
1211
@@ -15,4 +14,4 @@ FROM node:22-alpine
1514WORKDIR /app
1615ENV NODE_ENV=production
1716COPY --from=0 /app .
18- CMD ["npm " , "start " ]
17+ CMD ["node " , "packages/fastify-app/dist/src/server.js " ]
Original file line number Diff line number Diff line change 1- DATABASE_URL = postgres://postgres:postgres@host :5432/postgres?sslmode=disable&search_path=stripe
1+ DATABASE_URL = postgres://postgres:postgres@localhost :5432/postgres?sslmode=disable&search_path=stripe
22STRIPE_WEBHOOK_SECRET = whsec_
33
44# API_KEY is used to authenticate "admin" endpoints (i.e. for backfilling), make sure to generate a secure string
Original file line number Diff line number Diff line change 22 "name" : " @supabase/stripe-sync-fastify" ,
33 "version" : " 0.0.0" ,
44 "description" : " Stripe sync engine. Sync your Stripe account to your Postgres database." ,
5- "main" : " index.js " ,
5+ "main" : " src/server.ts " ,
66 "scripts" : {
77 "clean" : " rimraf dist" ,
88 "dev" : " tsx --watch ./src/server.ts" ,
99 "build" : " pnpm clean && tsc -p tsconfig.json" ,
1010 "typecheck" : " tsc -p tsconfig.json --noEmit" ,
1111 "lint" : " eslint src --ext .ts" ,
12- "start" : " NODE_ENV=production node dist/server.js" ,
12+ "start" : " NODE_ENV=production node dist/src/ server.js" ,
1313 "test" : " vitest"
1414 },
1515 "author" : " Supabase" ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import path from 'node:path'
66import { getConfig } from './utils/config'
77import { StripeSync } from '@supabase/stripe-sync-engine'
88import { errorSchema } from './error'
9+ import { logger } from './logger'
910
1011interface buildOpts extends FastifyServerOptions {
1112 exposeDocs ?: boolean
@@ -15,7 +16,7 @@ export async function createServer(opts: buildOpts = {}): Promise<FastifyInstanc
1516 const app = fastify ( opts )
1617
1718 const config = getConfig ( )
18- const stripeSync = new StripeSync ( config )
19+ const stripeSync = new StripeSync ( { ... config , logger } )
1920
2021 app . decorate ( 'stripeSync' , stripeSync )
2122
Original file line number Diff line number Diff line change 22 "extends" : " ../../tsconfig.base.json" ,
33 "compilerOptions" : {
44 "rootDir" : " ." ,
5+ "module" : " commonjs" ,
56 "outDir" : " dist" ,
67 "declaration" : true ,
78 "declarationMap" : true ,
Original file line number Diff line number Diff line change 1313 "skipLibCheck" : true ,
1414 "incremental" : true
1515 },
16- "exclude" : [" node_modules" , " dist" ],
17- "references" : [{ "path" : " ./packages/sync-engine" }, { "path" : " ./packages/fastify-app" }]
16+ "exclude" : [" node_modules" , " dist" ]
1817}
You can’t perform that action at this time.
0 commit comments