Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start NGINX (i.e., nginx_shell.nix) with systemd? #24

Open
toraritte opened this issue May 24, 2023 · 0 comments
Open

Start NGINX (i.e., nginx_shell.nix) with systemd? #24

toraritte opened this issue May 24, 2023 · 0 comments

Comments

@toraritte
Copy link
Member

Listening on privileged ports (e.g., 80) requires running NGINX as root (see https://unix.stackexchange.com/questions/134301/), and currently using the command

sudo $(which nix-shell) \
  --argstr "nix_shell_dir" "${NIX_SHELL_DIR}" \
  --argstr "timestamp" "$(date '+%Y-%m-%d_%H-%M-%S')" \
  --argstr "port" "80" \
  nginx_shell.nix

which works as it should, but if the resolution to issue #23 Add Gunicorn to nginx_shell.nix will be to use systemd, then consider using it here as well. (As far as I can tell, this will simply just mean to invoke the command above in a .service file and have an explicit dependency on the Gunicorn systemd unit. I think.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant