Currently cron and werker service immediately start running, but this makes no sense if Mautic isn't installed yet.
This PR adds a simple check to see if Mautic is installed, by checking if the config file exists, and if so if the the site_url is set. This corresponds with the check that Mautic does internally when booting up.
❯ docker compose logs mautic_worker -f --no-log-prefix
Mautic not installed, waiting to start workers
Mautic not installed, waiting to start workers
Mautic not installed, waiting to start workers
Mautic not installed, waiting to start workers
...
❯ docker compose logs mautic_worker -f --no-log-prefix
...
2024-02-19 21:12:49,262 INFO Set uid to user 0 succeeded
2024-02-19 21:12:49,265 INFO supervisord started with pid 251
2024-02-19 21:12:50,272 INFO spawned: 'messenger-consume-email_00' with pid 252
2024-02-19 21:12:50,274 INFO spawned: 'messenger-consume-email_01' with pid 253
2024-02-19 21:12:50,278 INFO spawned: 'messenger-consume-failed_00' with pid 254
2024-02-19 21:12:50,280 INFO spawned: 'messenger-consume-failed_01' with pid 255
2024-02-19 21:12:50,283 INFO spawned: 'messenger-consume-hit_00' with pid 256
2024-02-19 21:12:50,286 INFO spawned: 'messenger-consume-hit_01' with pid 257
...
Currently cron and werker service immediately start running, but this makes no sense if Mautic isn't installed yet.
This PR adds a simple check to see if Mautic is installed, by checking if the config file exists, and if so if the the
site_url
is set. This corresponds with the check that Mautic does internally when booting up.To test this PR:
install Mautic via the UI or CLI UI go to http://localhost:8001
CLI