Mobile support to come.
# Build stage
FROM rust:1.92.0-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 everything
COPY . .
# Build the application
RUN cargo build --release -p gitdot_server
# Runtime stage
FROM debian:bookworm-slim
WORKDIR /app
# Install git, ca-certificates, and curl for downloading difftastic
RUN apt-get update && \
apt-get install -y git ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
# Install difftastic
RUN curl -L https://github.com/Wilfred/difftastic/releases/download/0.67.0/difft-x86_64-unknown-linux-gnu.tar.gz -o /tmp/difft.tar.gz && \
tar -xzf /tmp/difft.tar.gz -C /tmp && \
mv /tmp/difft /usr/local/bin/difft && \
chmod +x /usr/local/bin/difft && \
rm /tmp/difft.tar.gz
# Configure git globally
RUN git config --system user.name "Git Server" && \
git config --system user.email "git@gitdot.io" && \
git config --system http.receivepack true && \
git config --system uploadpack.allowAnySHA1InWant true
# Copy the binary from builder
COPY --from=builder /app/target/release/gitdot_server /app/gitdot_server
# Set environment variables with defaults for Cloud Run
ENV GIT_PROJECT_ROOT="/srv/git"
ENV SERVER_HOST="0.0.0.0"
ENV SERVER_PORT="8080"
# Expose port 8080 (Cloud Run default)
EXPOSE 8080
# Run the binary
CMD ["/app/gitdot_server"]
testing difftastic
baepaul•ba19b1e10d ago
attempting to move dockerfile into backend
baepaul•2e996dc10d ago
created a shared rust lib for domain logic
mike•02e6c9924d ago
Updated Dockerfile with new package name
mike•286f16a1mo ago
Matched glibc version with Rust image
mike•3f4aaf91mo ago
Added dummy db url in Dockerfile
mike•7476c061mo ago
Updated Rust image to 1.92
mike•00921491mo ago
Updated Rust version in Dockerfile
mike•9b9514e1mo ago
Drafted a Dockerfile
mike•5714e841mo ago