sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.07k stars 188 forks source link

Packaging on Nixpkgs #658

Open Rizary opened 4 years ago

Rizary commented 4 years ago

Hi! I want to properly package sozu (using systemd) in nixpkgs (in case anyone doesn't know nixpkgs, it is a package manager used by NixOS or Nix programming language). So I am looking at the https://github.com/sozu-proxy/sozu/tree/master/os-build/systemd and wondering:

  1. why it wants to write a PID file in the first place
  2. Does RUNDIR same with RuntimeDirectory?

I have asked this in gitter but no one answered. I hope this is the place to discuss on this matter.

Geal commented 3 years ago

hello! The PID file is here to help systemd, so it can follow the mater process during upgrades (replacing the current version of sozu with a new one without downtime): https://github.com/sozu-proxy/sozu/blob/master/bin/config.toml#L88-L92 RUNDIR corresponds to /run or /var/run depending on how your system is set up. We use scripts to replace those values: https://github.com/sozu-proxy/sozu/blob/005a57e8683dc563fb8165aa367d723861dfe618/os-build/exherbo/generate.sh#L7