FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sync-engine/Dockerfile at dev · stripe/sync-engine · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
stripe
/
sync-engine
Public
Notifications
You must be signed in to change notification settings
Fork
116
Star
1.1k
Code
Issues
17
Pull requests
23
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
sync-engine
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
91 lines (70 loc) · 2.88 KB
Breadcrumbs
sync-engine
/
Dockerfile
Copy path
File metadata and controls
91 lines (70 loc) · 2.88 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
Monorepo Dockerfile — build individual images with --target:
#
docker build --target engine . → @stripe/sync-engine (stateless HTTP API)
#
docker build --target service . → @stripe/sync-service (serve + worker CLI)
#
---- Manifests stage (shared) ----
#
Extracts all package.json / lockfile / workspace config files via find so no
#
per-package COPY line needs updating when a new workspace package is added.
FROM
node:24-alpine AS manifests
WORKDIR
/app
COPY
. .
RUN
find . \
\(
-name
'package.json'
-o -name
'pnpm-workspace.yaml'
-o -name
'pnpm-lock.yaml'
\)
\
-not -path
'*/node_modules/*'
-not -path
'*/.git/*'
\
-exec sh -c
'dst="/m/$1"; mkdir -p "$(dirname "$dst")"; cp "$1" "$dst"'
_ {}
\;
#
===========================================================================
#
Engine
#
===========================================================================
FROM
node:24-alpine AS engine-build
ENV
PNPM_HOME=
"/pnpm"
ENV
PATH=
"$PNPM_HOME:$PATH"
RUN
corepack enable
WORKDIR
/app
#
---- Install layer (cached by BuildKit registry cache) ----
#
Seeded from the manifests stage — cache survives source-only changes.
COPY
--from=manifests /m/ ./
RUN
pnpm install --frozen-lockfile
#
---- Build layer ----
COPY
. ./
RUN
pnpm --filter @stripe/sync-engine deploy --legacy --prod /deploy
FROM
node:24-alpine AS engine
WORKDIR
/app
COPY
--from=engine-build /deploy/package.json ./
COPY
--from=engine-build /deploy/dist ./dist
COPY
--from=engine-build /deploy/node_modules ./node_modules
ARG
GIT_COMMIT=unknown
ARG
BUILD_DATE=unknown
ARG
COMMIT_URL=unknown
ENV
NODE_ENV=production
ENV
GIT_COMMIT=$GIT_COMMIT
ENV
BUILD_DATE=$BUILD_DATE
ENV
COMMIT_URL=$COMMIT_URL
ENTRYPOINT
[
"node"
,
"--use-env-proxy"
,
"dist/bin/serve.js"
]
#
===========================================================================
#
Service (also used for the worker container — same image, different CMD)
#
===========================================================================
FROM
node:24 AS service-build
ENV
PNPM_HOME=
"/pnpm"
ENV
PATH=
"$PNPM_HOME:$PATH"
RUN
corepack enable
WORKDIR
/app
#
---- Install layer (cached by BuildKit registry cache) ----
#
Seeded from the manifests stage — cache survives source-only changes.
COPY
--from=manifests /m/ ./
RUN
pnpm install --frozen-lockfile
#
---- Build layer ----
COPY
. ./
RUN
pnpm --filter @stripe/sync-service deploy --legacy --prod /deploy
FROM
node:24 AS service
WORKDIR
/app
COPY
--from=service-build /deploy/package.json ./
COPY
--from=service-build /deploy/dist ./dist
COPY
--from=service-build /deploy/node_modules ./node_modules
ARG
GIT_COMMIT=unknown
ARG
BUILD_DATE=unknown
ARG
COMMIT_URL=unknown
ENV
NODE_ENV=production
ENV
GIT_COMMIT=$GIT_COMMIT
ENV
BUILD_DATE=$BUILD_DATE
ENV
COMMIT_URL=$COMMIT_URL
ENTRYPOINT
[
"node"
,
"--use-env-proxy"
,
"dist/bin/sync-service.js"
]
CMD
[
"serve"
,
"--temporal-address"
,
"temporal:7233"
,
"--temporal-task-queue"
,
"sync-engine"
]
Back
|
FazBrowse Home
|
New Git URL