Skip to content

Instantly share code, notes, and snippets.

@gaoyifan
Created July 11, 2026 17:00
Show Gist options
  • Select an option

  • Save gaoyifan/c4882aff8a1cf9c622a3a5a1d5f7c335 to your computer and use it in GitHub Desktop.

Select an option

Save gaoyifan/c4882aff8a1cf9c622a3a5a1d5f7c335 to your computer and use it in GitHub Desktop.
ncps deployment example
log:
level: info
analytics:
reporting:
enabled: false
opentelemetry:
enabled: false
prometheus:
enabled: false
cache:
allow-delete-verb: false
allow-put-verb: false
hostname: ncps
database-url: sqlite:/storage/var/ncps/db/db.sqlite
max-size: 45G
lru:
schedule: "0 3 * * *"
timezone: UTC
sign-narinfo: false
storage:
local: /storage
temp-path: /tmp
upstream:
urls:
- https://cache.nixos.org
public-keys:
- cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
server:
addr: ":8501"
services:
create-directories:
image: alpine:3.22
network_mode: none
volumes:
- /srv/docker/ncps:/storage
command: >
/bin/sh -c "
mkdir -m 0755 -p /storage/var &&
mkdir -m 0700 -p /storage/var/ncps &&
mkdir -m 0700 -p /storage/var/ncps/db &&
chown -R 1000:1000 /storage
"
restart: "no"
migrate-database:
image: ghcr.io/kalbasit/ncps:v0.9.4
network_mode: none
depends_on:
create-directories:
condition: service_completed_successfully
volumes:
- /srv/docker/ncps:/storage
command: >
/bin/dbmate --url=sqlite:/storage/var/ncps/db/db.sqlite migrate up
restart: "no"
ncps:
image: ghcr.io/kalbasit/ncps:v0.9.4
container_name: ncps
network_mode: host
depends_on:
migrate-database:
condition: service_completed_successfully
volumes:
- /srv/docker/ncps:/storage
- ./config.yaml:/config.yaml:ro
command: /bin/ncps --analytics-reporting-enabled=false serve --config=/config.yaml
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment