Skip to content

Deployment

Terminal window
podman pull ghcr.io/contriboss/vein:latest
podman run -d \
--name vein \
-p 8346:8346 \
-v vein-data:/data \
-e RUST_LOG=info \
ghcr.io/contriboss/vein:latest
podman logs -f vein
Terminal window
cp vein.example.toml vein.toml
# edit vein.toml...
podman run -d \
--name vein \
-p 8346:8346 \
-v $(pwd)/vein.toml:/data/vein.toml:ro \
-v vein-data:/data \
vein:latest serve --config /data/vein.toml

The repository’s docker-compose.yml is a plain Compose file - no Docker-specific extensions - so Podman 4.7+’s built-in podman compose runs it as-is, with a PostgreSQL backend:

Terminal window
git clone https://github.com/contriboss/vein.git
cd vein
podman compose up -d
podman compose ps # both services should show "healthy"
podman compose logs -f vein
podman compose down

What’s included:

  • PostgreSQL 18 with persistent storage, healthchecked before Vein starts
  • Vein proxy with auto-migrations - no manual setup
  • Healthchecks for both services (GET /up for Vein)
  • Preconfigured bridge network

Point Bundler, Cargo, or npm at http://localhost:8346 and you’re done. A test service in the same compose file demonstrates pointing GEM_HOST, CARGO_REGISTRIES_CRATES_IO_*, and NPM_CONFIG_REGISTRY at the running proxy.

Containers are a Linux thing; FreeBSD’s native answer is jails. Blackship is a Rust jail orchestrator with TOML-declared jails and Jailfiles - a Docker-style build (FROM, RUN, LABEL, COPY, ENV, ARG) that produces a jail root instead of an image layer:

FROM 15.1-RELEASE
LABEL name=vein version=1.0
RUN env ASSUME_ALWAYS_YES=yes pkg bootstrap
RUN pkg install -y postgresql18-server rust
COPY vein.toml /etc/vein/vein.toml
Terminal window
sudo blackship bootstrap 15.1-RELEASE
sudo blackship build -f Jailfile -n vein
sudo blackship up vein
blackship ps
[Unit]
Description=Vein Package Proxy
After=network.target
[Service]
Type=simple
User=vein
ExecStart=/usr/local/bin/vein serve --config /etc/vein/vein.toml
Restart=always
[Install]
WantedBy=multi-user.target
upstream vein {
server localhost:8346;
}
server {
listen 443 ssl http2;
server_name packages.company.com;
location / {
proxy_pass http://vein;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Terminal window
curl -fsS http://localhost:8346/up
# or
vein health --url http://localhost:8346/up --timeout 5