mirror of
https://codeberg.org/likwid/likwid.git
synced 2026-02-10 05:23:09 +00:00
- Backend: Rust/Axum with PostgreSQL, plugin architecture - Frontend: Astro with polished UI - Voting methods: Approval, Ranked Choice, Schulze, STAR, Quadratic - Features: Liquid delegation, transparent moderation, structured deliberation - Documentation: User and admin guides in /docs - Deployment: Docker/Podman compose files for production and demo - Demo: Seeded data with 3 communities, 13 users, 7 proposals License: AGPLv3
48 lines
992 B
Docker
48 lines
992 B
Docker
# Likwid Backend Dockerfile
|
|
FROM rust:1.75-slim-bookworm as builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Install build dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
pkg-config \
|
|
libssl-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy manifests
|
|
COPY Cargo.toml Cargo.lock ./
|
|
|
|
# Create dummy main to cache dependencies
|
|
RUN mkdir src && echo "fn main() {}" > src/main.rs
|
|
RUN cargo build --release
|
|
RUN rm -rf src
|
|
|
|
# Copy source code
|
|
COPY src ./src
|
|
COPY migrations ./migrations
|
|
|
|
# Build the actual binary
|
|
RUN touch src/main.rs && cargo build --release
|
|
|
|
# Runtime stage
|
|
FROM debian:bookworm-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install runtime dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
ca-certificates \
|
|
libssl3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy binary and migrations
|
|
COPY --from=builder /app/target/release/likwid /app/likwid
|
|
COPY --from=builder /app/migrations /app/migrations
|
|
|
|
# Create non-root user
|
|
RUN useradd -r -s /bin/false likwid
|
|
USER likwid
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["./likwid"]
|