refactor: add production features and improve architecture - Add structured configuration with validation - Implement Redis connection pooling - Add database migrations system - Change API methods: GET /set → POST /set, GET /delete → DELETE /delete - Add health check endpoint - Add graceful shutdown and structured logging - Update frontend for new API methods - Add open source attribution
22 lines
495 B
Docker
22 lines
495 B
Docker
FROM rustlang/rust:nightly AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src ./src
|
|
COPY public ./public
|
|
COPY migrations ./migrations
|
|
|
|
RUN cargo build --release
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/target/release/timezone-db /usr/local/bin/app
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/migrations ./migrations
|
|
|
|
CMD ["/usr/local/bin/app"]
|