benzino77 / clamav-rest-api

ClamAV REST API. Scan files using simple POST request.
MIT License
127 stars 44 forks source link

Use wait-for-it tool to wait for ClamAV instance #27

Closed fl0ppy-d1sk closed 1 year ago

fl0ppy-d1sk commented 2 years ago

Hello @benzino77,

I saw that you installed the wait-for-it tool but it's not used. When CRA is started and if ClamAV is not started then CRA will stop. This is not very convenient : CRA should actively wait for ClamAV until it's started.

This PR makes use of wait-for-it to wait until ClamAV is started.

benzino77 commented 2 years ago

I did not change command or entrypoint on purpose. That is because I don't want to make a braking change. It is broader discussed here. Maybe it should be pointed somewhere in the README file.

Anyway, I think this change can be introduced in 2.0.0 version to indicate there is breaking change. Let me think about it (do not close this PR please).

benzino77 commented 2 years ago

I was also thinking about changing the execution engine from just instance of nodejs running the CRA to more "production ready" pm2 - this change could be included in or can extend your PR.