feat: Add Docker deployment for pkg.solstice-ci.org

Multi-stage Dockerfile (rust builder + debian-slim runtime),
docker-compose, and container-specific pkg6depotd config.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
This commit is contained in:
Till Wegmueller 2026-03-14 22:39:35 +01:00
parent e83f2b7284
commit 6865996190
No known key found for this signature in database
5 changed files with 73 additions and 0 deletions

8
.dockerignore Normal file
View file

@ -0,0 +1,8 @@
target/
repo/
artifacts/
.git/
.idea/
.vagrant/
sample_data/
*.md

2
.gitignore vendored
View file

@ -92,3 +92,5 @@ sample_data
.vagrant
/.output.txt
/repo/
/artifacts/

31
Dockerfile Normal file
View file

@ -0,0 +1,31 @@
# Stage 1: Build
FROM rust:1-bookworm AS builder
RUN apt-get update && apt-get install -y \
build-essential \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY . .
RUN cargo build --release -p pkg6depotd -p pkg6repo
# Stage 2: Runtime
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/release/pkg6depotd /usr/local/bin/
COPY --from=builder /build/target/release/pkg6repo /usr/local/bin/
COPY docker/pkg6depotd.kdl /etc/pkg6depotd.kdl
RUN mkdir -p /var/pkg/repo
EXPOSE 8080
ENTRYPOINT ["pkg6depotd", "--config", "/etc/pkg6depotd.kdl", "--no-daemon"]

18
docker-compose.yml Normal file
View file

@ -0,0 +1,18 @@
services:
pkg6depotd:
build: .
container_name: pkg6depotd
restart: unless-stopped
volumes:
- ./repo:/var/pkg/repo:ro
expose:
- "8080"
environment:
- VIRTUAL_HOST=pkg.solstice-ci.org
- VIRTUAL_PORT=8080
networks:
- solstice-ci_core
networks:
solstice-ci_core:
external: true

14
docker/pkg6depotd.kdl Normal file
View file

@ -0,0 +1,14 @@
server {
bind "0.0.0.0:8080"
workers 4
}
repository {
root "/var/pkg/repo"
mode "readonly"
}
telemetry {
service-name "pkg6depotd"
log-format "json"
}