Skip to content

Commit

Permalink
fix(service): explicitly set user in systemd definition (#11066)
Browse files Browse the repository at this point in the history
Previously, no User clause was present.  While this still made systemd
run kong under the 'root' user id, the HOME environment variable would
not be set in the Kong process.  This caused the datafile library to
fail with various error conditions.
  • Loading branch information
hanshuebner authored Jun 26, 2023
1 parent 866a15c commit 96eb92f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
[#10896](https://github.com/Kong/kong/pull/10896)
- Fix a bug when worker consuming dynamic log level setting event and using a wrong reference for notice logging
[#10897](https://github.com/Kong/kong/pull/10897)
- Added a `User=` specification to the systemd unit definition so that
Kong can be controlled by systemd again.
[#11066](https://github.com/Kong/kong/pull/11066)

#### Admin API

Expand Down
1 change: 1 addition & 0 deletions build/package/kong.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Documentation=https://docs.konghq.com/
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
User=root
ExecStartPre=/usr/local/bin/kong prepare -p /usr/local/kong
ExecStart=/usr/local/openresty/nginx/sbin/nginx -p /usr/local/kong -c nginx.conf
ExecReload=/usr/local/bin/kong prepare -p /usr/local/kong
Expand Down

1 comment on commit 96eb92f

@khcp-gha-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:96eb92f2e301b4b249eae710d51715931a683656
Artifacts available https://github.com/Kong/kong/actions/runs/5378107620

Please sign in to comment.