-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM oven/bun:1-alpine AS css-builder | ||
WORKDIR /temp | ||
COPY package.json bun.lockb ./ | ||
RUN bun install --frozen-lockfile | ||
|
||
COPY gridPlugin.js tailwind.config.js ./ | ||
COPY src ./src | ||
RUN bunx tailwindcss -i ./src/style.css -o ./out.css --minify | ||
|
||
FROM --platform=$BUILDPLATFORM rust:1.80-alpine AS build | ||
|
||
RUN apk add musl-dev --no-cache && rustup target add aarch64-unknown-linux-musl | ||
|
||
WORKDIR /usr/src | ||
RUN USER=root cargo new --bin vesta | ||
WORKDIR /usr/src/vesta | ||
COPY Cargo.toml Cargo.lock ./ | ||
COPY src ./src | ||
RUN cargo build --release --target=aarch64-unknown-linux-musl | ||
|
||
FROM scratch | ||
|
||
WORKDIR /app | ||
COPY ./static static | ||
COPY --from=css-builder /temp/out.css ./static/style.css | ||
COPY --from=build /usr/src/vesta/target/aarch64-unknown-linux-musl/release/vesta /app/vesta | ||
|
||
CMD ["/app/vesta"] |