I'm trying to create scheduled containerapp job in Azure.
In the container there is a Node.js app doing a background job (no UI etc).
A few times the Node.js app has written console.log
messages to the Azure log, but for most deployments it does not seem to start (no app logs are written).
The system log gets populated, so the job seem to be executed every X minutes.
Does anyone know why this is happening? How can I make the job start the Node.js app?
At the end of my Dockerfile I have this line that is supposed to start the Node.js app:
CMD node /app/js/app.js
I've tried different configs for the az containerapp job create
command, but no success so far.
I added a JavaScript "sleep-function" before any logging in the Node.js code and it seems to do the trick. Logs from the application are now stored.
It doesn't feel right, but it works. :(