Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: softpython2884/OpenCoperLock
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: softpython2884/OpenCoperLock
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: vtest
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 3 files changed
  • 2 contributors

Commits on Jun 20, 2026

  1. Fix project-local PostgreSQL provisioning when the wizard runs as root

    PostgreSQL refuses to run as root, but the setup wizard (and deploy.sh and
    PM2) commonly run as root on a dedicated server. In that case Step 3 aborted
    with "run this as the unprivileged user that will own the database, not root"
    because postgres-local.sh inherited root and hit its own guard — and the same
    failure would have recurred at deploy (ctl-start) and at PM2 start time.
    
    - postgres-local.sh: when invoked as root, re-exec as the unprivileged owner of
      .postgres/ (from $PG_RUN_USER for the first init, else the dir's owner) via
      runuser instead of failing. Fixes init, ctl-start/ctl-stop and manual use.
    - ecosystem.config.cjs: PM2 drops to the cluster owner's uid/gid for the
      postgres process so it starts cleanly when PM2 runs as root.
    - setup-wizard.sh: determine/create a non-root app user, chown .postgres/ to it,
      and pass PG_RUN_USER so the very first init hands off correctly.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    softpython2884 and claude committed Jun 20, 2026
    Configuration menu
    Copy the full SHA
    65ee3d2 View commit details
    Browse the repository at this point in the history
Loading