-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Pew Pew Collection ships as a multi-arch container image published to GHCR. Docker is the supported install path; the from-source workflow exists for contributors.
docker run -d \
--name ppcollection \
-p 3000:3000 \
-e SESSION_SECRET="$(openssl rand -hex 32)" \
-e ADMIN_USERNAME=admin \
-e ADMIN_PASSWORD=YourSecurePassword \
-v "$(pwd)/data:/data" \
--restart unless-stopped \
ghcr.io/gogorichielab/ppcollection:latestOpen http://localhost:3000 and log in with the username and password you supplied. The app will force a password change before letting you continue.
Your data lives in
./data/app.dbon the host. The-v "$(pwd)/data:/data"bind mount is what persists your inventory across container updates. Back up thedata/directory to back up your collection.docker runrequires an absolute host path — a bare./datais interpreted as an anonymous volume, which Docker discards every time the container is recreated. If you prefer a managed volume instead of a host directory, use-v ppcollection_data:/data.
services:
ppcollection:
image: ghcr.io/gogorichielab/ppcollection:latest
container_name: ppcollection
restart: unless-stopped
ports:
- "3000:3000"
environment:
SESSION_SECRET: ${SESSION_SECRET}
ADMIN_USERNAME: admin
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
volumes:
- ./data:/data
stop_grace_period: 15sGenerate secrets and bring it up:
export SESSION_SECRET="$(openssl rand -hex 32)"
export ADMIN_PASSWORD="$(openssl rand -base64 24)"
docker compose up -dRequires Node.js >=20.0.0 <25.0.0. The repo pins Node 20 via .nvmrc.
git clone https://github.com/Gogorichielab/PPCollection.git
cd PPCollection
nvm use # picks up .nvmrc
npm ci
npm run dev # or: npm startThe dev server runs at http://localhost:3000. The SQLite database is created
at ./data/app.db and migrations run automatically on boot.
- The container or process must start with
SESSION_SECRETandADMIN_PASSWORDset to non-default values whenNODE_ENV=production. The app refuses to boot otherwise — this is the first-run guard. - Log in with
ADMIN_USERNAME/ADMIN_PASSWORD. The app immediately redirects to/change-password. - Set a new password (bcrypt cost 12). The
must_change_passwordflag is cleared and you land on the dashboard. - From Profile, optionally change the username, toggle the theme, and enable update notifications.
If you put the app behind nginx, Caddy, or Traefik with HTTPS, set
TRUST_PROXY=true. The Security page covers the
full reverse-proxy configuration matrix.
The entire inventory lives in data/app.db. To back up:
docker exec ppcollection sqlite3 /data/app.db ".backup /data/app.db.bak"
cp ./data/app.db.bak /your/backup/location/A plain cp of the file works when the container is stopped. While the
container is running, prefer the .backup form above so SQLite quiesces
writes before copying.
Pew Pew Collection · Self-hosted, offline-first firearm inventory · Business Source License 1.1
Getting started
Running it
Reference