Conversation
| # # Optional healthcheck section: | ||
| # healthcheck: | ||
| # test: ["CMD", "cli/health.php"] | ||
| # timeout: 10s | ||
| # start_period: 60s | ||
| # start_interval: 11s | ||
| # interval: 75s | ||
| # retries: 3 |
There was a problem hiding this comment.
I'd indent this by one more space, because if you remove the # the YAML format will be invalid.
There was a problem hiding this comment.
Or actually I think one space needs to be removed on each of the lines.
There was a problem hiding this comment.
It looks good to me.
Using automatic Toggle line comment from an IDE such as VSCode produces the following result (and it works as well in the other direction):
environment:
TZ: Europe/Paris
CRON_MIN: '3,33'
TRUSTED_PROXY: 172.16.0.1/12 192.168.0.1/16
# Optional healthcheck section:
healthcheck:
test: ["CMD", "cli/health.php"]
timeout: 10s
start_period: 60s
start_interval: 11s
interval: 75s
retries: 3Did you try in an IDE (and in that case which one?) or did you uncomment manually line by line?
Note that the convention for this type of comment is the comment sign itself followed by a space, as hinted in the first line # # Optional healthcheck section:
Side note: This is another example where tabs for indenting (which I prefer) would have reduced confusion 🤓
There was a problem hiding this comment.
I'm used to adding/removing just one # char by hand. Anyway, if IDEs do it the way you describe then I guess I need to adapt.
There was a problem hiding this comment.
I misunderstood the initial comment. The diff makes it look aligned with what's above.
Anyway, if IDEs do it the way you describe then I guess I need to adapt.
Geany (Scintilla) does something clever I wish other editors did too btw: it'll write //~, #~ etc. to distinguish a human comment from a machine-assisted comment. It nearly completely removes the accidental uncommenting that sometimes occurs in other editors.
Specifically, if you didn't add the extra comment in front of # Optional healthcheck section: you might accidentally turn it into a syntax error when uncommenting. Scintilla-style commenting makes it so you don't have to be nearly as precise in where you add or remove comments.
|
I just tested this locally, and the health check works. I didn't test a failure case however. |
schildbach
left a comment
There was a problem hiding this comment.
Consider this approved, with or without the code comment.
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Frenzie
left a comment
There was a problem hiding this comment.
Script's good, didn't check the Docker part (but lgtm)
- Replaced the custom inline PHP healthcheck with the official FreshRSS health script (`cli/health.php`). - Improves maintainability and aligns with upstream changes from FreshRSS PR #7945. - Ensures better compatibility and easier debugging. Refs FreshRSS/FreshRSS#7945
- Replaced the custom inline PHP healthcheck with the official FreshRSS health script (`cli/health.php`). - Improves maintainability and aligns with upstream changes from FreshRSS PR #7945. - Ensures better compatibility and easier debugging. Refs FreshRSS/FreshRSS#7945
fix #7377