feat: worker crate, cargo-generate config, liquid templates, docker

This commit is contained in:
2026-05-18 00:26:17 +02:00
parent 1c5ae5d239
commit 5b0d5bf15d
15 changed files with 239 additions and 116 deletions

View File

@@ -1,27 +1,11 @@
FROM rust:1.92 AS builder
FROM rust:1.85-slim AS builder
WORKDIR /app
COPY . .
# Build the release binary
RUN cargo build --release -p api
RUN cargo build --release -p bootstrap
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install OpenSSL (required for many Rust networking crates) and CA certificates
RUN apt-get update && apt-get install -y libssl3 ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/api .
# Create data directory for SQLite
RUN mkdir -p /app/data
ENV DATABASE_URL=sqlite:///app/data/template.db
ENV SESSION_SECRET=supersecretchangeinproduction
COPY --from=builder /app/target/release/server ./server
EXPOSE 3000
CMD ["./api"]
CMD ["./server"]