clean up dockerfile
This commit is contained in:
+14
-14
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
FROM ghcr.io/pnpm/pnpm:11 AS web-build
|
FROM ghcr.io/pnpm/pnpm:11 AS web-build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app/bskyembed
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
@@ -17,24 +17,18 @@ ENV CI=1
|
|||||||
# use the pnpm version specified in package.json
|
# use the pnpm version specified in package.json
|
||||||
ENV pnpm_config_pm_on_fail=download
|
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
|
# Generate the embed bundle. NOTE: this will change
|
||||||
#
|
#
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
pnpm install --frozen-lockfile && \
|
pnpm install --frozen-lockfile --ignore-scripts && \
|
||||||
export PATH="/app/node_modules/.bin:$PATH" && \
|
pnpm build && \
|
||||||
cd bskyembed && pnpm install --frozen-lockfile && cd .. && \
|
pnpm build-snippet && \
|
||||||
pnpm build-embed
|
node_modules/.bin/node ../scripts/post-embed-build.js
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Stage 2: build the embedr Go binary, embedding the assets from stage 1.
|
# 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
|
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/ && \
|
RUN cd bskyweb/ && \
|
||||||
go mod download && \
|
go mod download && \
|
||||||
go mod verify
|
go mod verify
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^10.0.1",
|
"@eslint/js": "^10.0.1",
|
||||||
"@preact/preset-vite": "^2.10.6",
|
"@preact/preset-vite": "^2.10.6",
|
||||||
|
"@types/node": "^24.12.2",
|
||||||
"@typescript-eslint/parser": "^8.64.0",
|
"@typescript-eslint/parser": "^8.64.0",
|
||||||
"@vitejs/plugin-legacy": "^8.2.1",
|
"@vitejs/plugin-legacy": "^8.2.1",
|
||||||
"autoprefixer": "^10.5.4",
|
"autoprefixer": "^10.5.4",
|
||||||
@@ -56,5 +57,17 @@
|
|||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@types/estree": "1.0.6"
|
"@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"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+594
-375
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,7 @@
|
|||||||
allowBuilds:
|
allowBuilds:
|
||||||
core-js: true
|
core-js: false
|
||||||
unrs-resolver: true
|
unrs-resolver: false
|
||||||
minimumReleaseAgeExclude:
|
minimumReleaseAgeExclude:
|
||||||
- '@atproto/*'
|
- '@atproto/*'
|
||||||
- '@atproto-labs/*'
|
- '@atproto-labs/*'
|
||||||
- '@bsky.app/*'
|
- '@bsky/*'
|
||||||
- 'bsky-sdk-preview@0.0.1-preview.1'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user