clean up dockerfile

This commit is contained in:
Samuel Newman
2026-08-10 15:07:27 +03:00
parent d7343bda07
commit 974dd7db65
4 changed files with 624 additions and 393 deletions
+14 -14
View File
@@ -6,7 +6,7 @@
#
FROM ghcr.io/pnpm/pnpm:11 AS web-build
WORKDIR /app
WORKDIR /app/bskyembed
ENV DEBIAN_FRONTEND=noninteractive
@@ -17,24 +17,18 @@ ENV CI=1
# use the pnpm version specified in package.json
ENV pnpm_config_pm_on_fail=download
COPY . .
COPY bskyembed ./
COPY bskyweb /app/bskyweb
COPY scripts/post-embed-build.js /app/scripts/post-embed-build.js
#
# Generate the embed bundle. NOTE: this will change
#
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm install --frozen-lockfile && \
export PATH="/app/node_modules/.bin:$PATH" && \
cd bskyembed && pnpm install --frozen-lockfile && cd .. && \
pnpm build-embed
# DEBUG
RUN find ./bskyweb/embedr-static && find ./bskyweb/embedr-templates && find ./bskyembed/dist
# hack around issue with empty directory and go:embed
RUN touch bskyweb/static/js/empty.txt
RUN touch bskyweb/static/css/empty.txt
RUN touch bskyweb/static/media/empty.txt
pnpm install --frozen-lockfile --ignore-scripts && \
pnpm build && \
pnpm build-snippet && \
node_modules/.bin/node ../scripts/post-embed-build.js
#
# Stage 2: build the embedr Go binary, embedding the assets from stage 1.
@@ -52,6 +46,12 @@ ENV GOEXPERIMENT="loopvar"
COPY --from=web-build /app/bskyweb ./bskyweb
# hack around issue with empty directory and go:embed
RUN touch \
bskyweb/static/js/empty.txt \
bskyweb/static/css/empty.txt \
bskyweb/static/media/empty.txt
RUN cd bskyweb/ && \
go mod download && \
go mod verify
+13
View File
@@ -36,6 +36,7 @@
"devDependencies": {
"@eslint/js": "^10.0.1",
"@preact/preset-vite": "^2.10.6",
"@types/node": "^24.12.2",
"@typescript-eslint/parser": "^8.64.0",
"@vitejs/plugin-legacy": "^8.2.1",
"autoprefixer": "^10.5.4",
@@ -56,5 +57,17 @@
},
"resolutions": {
"@types/estree": "1.0.6"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
+594 -375
View File
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -1,8 +1,7 @@
allowBuilds:
core-js: true
unrs-resolver: true
core-js: false
unrs-resolver: false
minimumReleaseAgeExclude:
- '@atproto/*'
- '@atproto-labs/*'
- '@bsky.app/*'
- 'bsky-sdk-preview@0.0.1-preview.1'
- '@bsky/*'