- Added package.json with dependencies and scripts for development, build, and linting. - Created postcss.config.mjs for Tailwind CSS integration. - Added SVG assets for UI components including file, globe, next, vercel, and window icons. - Configured TypeScript with tsconfig.json for strict type checking and module resolution.
28 lines
562 B
Docker
28 lines
562 B
Docker
FROM rust:1.92 AS builder
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
# Build the release binary
|
|
RUN cargo build --release -p api
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
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
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["./api"]
|