Skip to content

Conversation

davidharting
Copy link
Owner

To do this, also need to:

  • Set up new "cron" service in docker compose to run laravel scheduler
  • Set up a local docker-compose setup

But I'm not running the scheduler yet!
Needs a health check though
With docker-compose locally of course!

Issues so far:
- web server considered unhealthy (but seems to be working fine?)
- no hot reloading =D (future problem)
- cron server considered unhealthy (no healthcheck)
- Need to run seeders automatically
@davidharting
Copy link
Owner Author

davidharting commented May 5, 2025

  • Fix web server health check for local dev
  • Add health check to scheduler
  • No persistent volumes for dev
    • Instead of doing that, I will just use docker-compose down -v when taking down the containers to remove the volumes as well.
  • Run seeder as a one-off in dev
  • Taskfile for build and compose commands in dev
    • docker builder build -t davidhartingdotcom:latest -f Dockerfile .
    • docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d

@davidharting
Copy link
Owner Author

davidharting commented May 5, 2025

  • I should set the healthcheck interval to 30s.

I was thinking that this was a readiness probe. It is not it's doing this check every second for the lifetime of the app.

e.g., see docs

Cron is basically the same as the queue:work healthcheck. But i realized
that i configured it to be more like a readiness probe with the very
aggressive every 1s interval. so i am using 30s here.

However, I am leaving database at 1s because I need database to be ready
before anything else can start. (I use depends_on for this). I don't
want to sit around for 30s with a ready database that docker doesn't
know is ready before it will start up my webserver.

Maybe I should just remove the dependency actually for the webserver
though instead. that would be a different possibly better way to fix it.
like if the db is down do i actually want my webserver to be down?
probably not. better to just start?
not the database though still at 1s see prior commit
@davidharting davidharting merged commit 3a91fa2 into main May 5, 2025
1 check passed
@davidharting davidharting deleted the run-pulse-check branch May 5, 2025 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant