this repo has no description
1# Stage 1: Build frontend with Deno 2FROM denoland/deno:alpine AS frontend-builder 3WORKDIR /frontend 4COPY frontend/ ./ 5RUN deno task build 6 7# Stage 2: Build Rust backend 8FROM rust:1.92-alpine AS builder 9 10RUN apk add ca-certificates openssl openssl-dev pkgconfig 11 12WORKDIR /app 13 14COPY Cargo.toml Cargo.lock ./ 15RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src 16 17COPY src ./src 18COPY tests ./tests 19COPY migrations ./migrations 20COPY .sqlx ./.sqlx 21RUN touch src/main.rs && cargo build --release 22 23# Stage 3: Final image 24FROM alpine:3.23 25 26COPY --from=builder /app/target/release/bspds /usr/local/bin/bspds 27COPY --from=builder /app/migrations /app/migrations 28COPY --from=frontend-builder /frontend/dist /app/frontend/dist 29 30WORKDIR /app 31 32ENV SERVER_HOST=0.0.0.0 33ENV SERVER_PORT=3000 34ENV FRONTEND_DIR=/app/frontend/dist 35 36EXPOSE 3000 37 38CMD ["bspds"]