I've been saying "PDSes seem easy enough, they're what, some CRUD to a db? I can do that in my sleep". well i'm sleeping rn so let's go
at main 884 B view raw
1# Stage 1: Build frontend with Deno 2FROM denoland/deno:alpine AS frontend-builder 3WORKDIR /frontend 4COPY frontend/ ./ 5RUN deno task build 6# Stage 2: Build Rust backend 7FROM rust:1.92-alpine AS builder 8RUN apk add ca-certificates openssl openssl-dev pkgconfig 9WORKDIR /app 10COPY Cargo.toml Cargo.lock ./ 11RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src 12COPY src ./src 13COPY tests ./tests 14COPY migrations ./migrations 15COPY .sqlx ./.sqlx 16RUN touch src/main.rs && cargo build --release 17# Stage 3: Final image 18FROM alpine:3.23 19COPY --from=builder /app/target/release/tranquil-pds /usr/local/bin/tranquil-pds 20COPY --from=builder /app/migrations /app/migrations 21COPY --from=frontend-builder /frontend/dist /app/frontend/dist 22WORKDIR /app 23ENV SERVER_HOST=0.0.0.0 24ENV SERVER_PORT=3000 25ENV FRONTEND_DIR=/app/frontend/dist 26EXPOSE 3000 27CMD ["tranquil-pds"]