initial docker setup
This commit is contained in:
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM oven/bun:debian AS frontend-dependency-installer
|
||||
WORKDIR /usr/src/warren
|
||||
|
||||
COPY frontend/package.json frontend/bun.lock ./
|
||||
RUN bun install --frozen-lockfile --ignore-scripts
|
||||
|
||||
|
||||
FROM node:bookworm AS frontend-builder
|
||||
WORKDIR /usr/src/warren
|
||||
|
||||
COPY --from=frontend-dependency-installer /usr/src/warren/ .
|
||||
COPY frontend/ ./
|
||||
RUN npm run generate
|
||||
|
||||
|
||||
FROM rust:bookworm AS backend-builder
|
||||
WORKDIR /usr/src/warren
|
||||
|
||||
COPY backend/ .
|
||||
RUN cargo build --release
|
||||
|
||||
|
||||
FROM debian:bookworm
|
||||
WORKDIR /var/lib/warren
|
||||
|
||||
COPY --from=backend-builder /usr/src/warren/target/release/warren /usr/bin/warren
|
||||
COPY --from=frontend-builder /usr/src/warren/dist ./frontend
|
||||
|
||||
ENTRYPOINT ["warren"]
|
||||
Reference in New Issue
Block a user