tangled
alpha
login
or
join now
roost.moe
/
recipes.blue
2
fork
atom
The recipes.blue monorepo
recipes.blue
recipes
appview
atproto
2
fork
atom
overview
issues
1
pulls
pipelines
feat: migrate dockerfiles to bun
hayden.moe
3 months ago
e27b3baa
a81a3806
verified
This commit was signed with the committer's
known signature
.
hayden.moe
SSH Key Fingerprint:
SHA256:egi2RxHATuWGOtHoLWJQb68bxJ+Jg/4m40QL5UFBWEI=
+51
-57
5 changed files
expand all
collapse all
unified
split
Dockerfile
apps
api
Dockerfile
ingester
Dockerfile
fly.toml
mise.toml
-14
Dockerfile
···
1
1
-
FROM node:22-slim AS base
2
2
-
ENV PNPM_HOME="/pnpm"
3
3
-
ENV PATH="$PNPM_HOME:$PATH"
4
4
-
RUN corepack enable
5
5
-
6
6
-
FROM base AS build
7
7
-
WORKDIR /usr/src/app
8
8
-
COPY pnpm-lock.yaml .
9
9
-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm fetch
10
10
-
COPY . .
11
11
-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
12
12
-
13
13
-
ARG VITE_API_SERVICE
14
14
-
RUN pnpm run -r build
+25
apps/api/Dockerfile
···
1
1
+
FROM oven/bun:1.3.3 AS base
2
2
+
WORKDIR /app
3
3
+
4
4
+
FROM base AS deps
5
5
+
COPY package.json bun.lock ./
6
6
+
COPY apps/*/package.json apps/
7
7
+
COPY libs/*/package.json libs/
8
8
+
RUN bun install --frozen-lockfile
9
9
+
10
10
+
FROM base AS build
11
11
+
COPY --from=deps /app/node_modules ./node_modules
12
12
+
COPY . .
13
13
+
14
14
+
WORKDIR /app/apps/api
15
15
+
RUN bun build ./src/index.ts \
16
16
+
--compile \
17
17
+
--minify \
18
18
+
--sourcemap \
19
19
+
--bytecode \
20
20
+
--outfile=/app/dist/api \
21
21
+
--target=bun
22
22
+
23
23
+
FROM base AS run
24
24
+
COPY --from=build /app/dist/api /app/api
25
25
+
ENTRYPOINT ["/app/api"]
+25
apps/ingester/Dockerfile
···
1
1
+
FROM oven/bun:1.3.3 AS base
2
2
+
WORKDIR /app
3
3
+
4
4
+
FROM base AS deps
5
5
+
COPY package.json bun.lock ./
6
6
+
COPY apps/*/package.json apps/
7
7
+
COPY libs/*/package.json libs/
8
8
+
RUN bun install --frozen-lockfile
9
9
+
10
10
+
FROM base AS build
11
11
+
COPY --from=deps /app/node_modules ./node_modules
12
12
+
COPY . .
13
13
+
14
14
+
WORKDIR /app/apps/ingester
15
15
+
RUN bun build ./src/index.ts \
16
16
+
--compile \
17
17
+
--minify \
18
18
+
--sourcemap \
19
19
+
--bytecode \
20
20
+
--outfile=/app/dist/ingester \
21
21
+
--target=bun
22
22
+
23
23
+
FROM base AS run
24
24
+
COPY --from=build /app/dist/ingester /app/ingester
25
25
+
ENTRYPOINT ["/app/ingester"]
-43
fly.toml
···
1
1
-
app = "cookware"
2
2
-
primary_region = "lhr"
3
3
-
4
4
-
[build]
5
5
-
dockerfile = "Dockerfile"
6
6
-
[build.args]
7
7
-
VITE_API_SERVICE = "recipes.blue"
8
8
-
9
9
-
[processes]
10
10
-
web = "bash -c 'cd apps/api && node dist/index.js'"
11
11
-
ingester = "bash -c 'cd apps/ingester && node dist/index.js'"
12
12
-
13
13
-
[env]
14
14
-
CORS_ORIGINS = "https://recipes.blue,http://127.0.0.1:5173"
15
15
-
16
16
-
[deploy]
17
17
-
release_command = "bash -c 'cd libs/database && pnpm db:migrate'"
18
18
-
19
19
-
[[vm]]
20
20
-
size = "shared-cpu-1x"
21
21
-
memory = 256
22
22
-
processes = ["web"]
23
23
-
24
24
-
[[vm]]
25
25
-
size = "shared-cpu-1x"
26
26
-
memory = 256
27
27
-
processes = ["ingester"]
28
28
-
29
29
-
[[services]]
30
30
-
http_checks = []
31
31
-
processes = ["web"]
32
32
-
internal_port = 8080
33
33
-
[[services.ports]]
34
34
-
handlers = ["http"]
35
35
-
port = 80
36
36
-
force_https = true
37
37
-
[[services.ports]]
38
38
-
handlers = ["tls", "http"]
39
39
-
port = 443
40
40
-
41
41
-
[[statics]]
42
42
-
guest_path = "/usr/src/app/apps/web/dist"
43
43
-
url_prefix = "/"
+1
mise.toml
···
1
1
[tools]
2
2
+
bun = "1.3.3"
2
3
cue = "0.15.1"