I have a repository [1] with a cron job defined with a database. I want to host it using docker-compose and populate rows using the database service name. I learned, I can use the service name as host in this use case. Python ORM library does not recognize this, though. The definition of host occurs in src/setup/config.py. I can access the containarized database with command psql, but not the other container.
Without having looked at the compose file (due to the lack of readability), I can highly recommend https://github.com/aptible/supercronic, which works with crontab files, but does neither require the container to start as root, nor any special twist to make it work.