File tree Expand file tree Collapse file tree 7 files changed +9
-10
lines changed Expand file tree Collapse file tree 7 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 68
68
id : docker_build
69
69
uses : docker/build-push-action@v6
70
70
with :
71
- context : packages/fastify-app
72
71
push : true
73
72
tags : supabase/stripe-sync-engine:latest,supabase/stripe-sync-engine:v${{ needs.release.outputs.new-release-version }}
74
73
platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ FROM node:22-alpine
4
4
RUN npm install -g
[email protected]
5
5
6
6
WORKDIR /app
7
- COPY package.json pnpm-lock.yaml ./
7
+ COPY . ./
8
8
RUN pnpm install --frozen-lockfile
9
- COPY . /app
10
9
RUN pnpm build
11
10
RUN pnpm prune --production
12
11
@@ -15,4 +14,4 @@ FROM node:22-alpine
15
14
WORKDIR /app
16
15
ENV NODE_ENV=production
17
16
COPY --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
2
2
STRIPE_WEBHOOK_SECRET = whsec_
3
3
4
4
# 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 2
2
"name" : " @supabase/stripe-sync-fastify" ,
3
3
"version" : " 0.0.0" ,
4
4
"description" : " Stripe sync engine. Sync your Stripe account to your Postgres database." ,
5
- "main" : " index.js " ,
5
+ "main" : " src/server.ts " ,
6
6
"scripts" : {
7
7
"clean" : " rimraf dist" ,
8
8
"dev" : " tsx --watch ./src/server.ts" ,
9
9
"build" : " pnpm clean && tsc -p tsconfig.json" ,
10
10
"typecheck" : " tsc -p tsconfig.json --noEmit" ,
11
11
"lint" : " eslint src --ext .ts" ,
12
- "start" : " NODE_ENV=production node dist/server.js" ,
12
+ "start" : " NODE_ENV=production node dist/src/ server.js" ,
13
13
"test" : " vitest"
14
14
},
15
15
"author" : " Supabase" ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import path from 'node:path'
6
6
import { getConfig } from './utils/config'
7
7
import { StripeSync } from '@supabase/stripe-sync-engine'
8
8
import { errorSchema } from './error'
9
+ import { logger } from './logger'
9
10
10
11
interface buildOpts extends FastifyServerOptions {
11
12
exposeDocs ?: boolean
@@ -15,7 +16,7 @@ export async function createServer(opts: buildOpts = {}): Promise<FastifyInstanc
15
16
const app = fastify ( opts )
16
17
17
18
const config = getConfig ( )
18
- const stripeSync = new StripeSync ( config )
19
+ const stripeSync = new StripeSync ( { ... config , logger } )
19
20
20
21
app . decorate ( 'stripeSync' , stripeSync )
21
22
Original file line number Diff line number Diff line change 2
2
"extends" : " ../../tsconfig.base.json" ,
3
3
"compilerOptions" : {
4
4
"rootDir" : " ." ,
5
+ "module" : " commonjs" ,
5
6
"outDir" : " dist" ,
6
7
"declaration" : true ,
7
8
"declarationMap" : true ,
Original file line number Diff line number Diff line change 13
13
"skipLibCheck" : true ,
14
14
"incremental" : true
15
15
},
16
- "exclude" : [" node_modules" , " dist" ],
17
- "references" : [{ "path" : " ./packages/sync-engine" }, { "path" : " ./packages/fastify-app" }]
16
+ "exclude" : [" node_modules" , " dist" ]
18
17
}
You can’t perform that action at this time.
0 commit comments