Skip to content

Commit 1644c55

Browse files
committed
build capnp as part of image build
1 parent dfb6559 commit 1644c55

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
node_modules/
33
.storage
44
.wrangler
5+
.capnp

Dockerfile

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
FROM oven/bun:1-debian AS builder
2+
3+
WORKDIR /app
4+
5+
COPY . .
6+
7+
RUN bun install --frozen-lockfile
8+
9+
RUN bun run docker:build
10+
111
FROM jacoblincool/workerd:latest
212

3-
COPY ./worker.capnp ./worker.capnp
13+
COPY --from=builder /app/worker.capnp ./worker.capnp
414

515
EXPOSE 8080/tcp
616
CMD ["serve", "--experimental", "--binary", "worker.capnp"]

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "disgit",
3-
"version": "0.0.1",
3+
"version": "1 .0.0",
44
"description": "A Cloudflare Worker which provides better GitHub->Discord webhook integration than the built-in Discord webhook executor.",
55
"license": "Apache-2.0",
66
"repository": {
@@ -17,6 +17,7 @@
1717
"selflare": "^1.1.2"
1818
},
1919
"scripts": {
20+
"docker:build": "wrangler deploy --dry-run --outdir .wrangler/dist && selflare compile --script .wrangler/dist/index.js",
2021
"build": "selflare compile",
2122
"start": "wrangler dev src/index.ts --local=true",
2223
"docker": "wrangler dev index.ts --local=true",

worker.capnp

-389 KB
Binary file not shown.

0 commit comments

Comments
 (0)