Running Docker image on CentOS v8 + Podman: initialization?

I’m trying to get the Docker image up and running on my CentOS v8.3. server, using Podman.
Running appears to be fine now, all the servers up, had to make some adjustments to get the environment variables in there (podman-compose seems to have issues using the .env files).
But the servers are not initialising themselves, so plenty of errors in the logs on that.
The main issue that I have:

  • How can I have the container initialize the servers in there?

  • this guide here tells me I should run docker-compose run --rm web bundle exec rake mastodon:setup to have the container initialise itself and spit out a configuration. But I get error messages for the database and redis when I try to feed my setting to the script:

    PostgreSQL host: localhost
    PostgreSQL port: 5432
    Name of PostgreSQL database: mastodon_production
    Name of PostgreSQL user: mastodon
    Password of PostgreSQL user: ***********
    Database connection could not be established with this configuration, try again.
    could not connect to server: Connection refused
    Is the server running on host “localhost” (::1) and accepting
    TCP/IP connections on port 5432?
    could not connect to server: Connection refused
    Is the server running on host “localhost” (127.0.0.1) and accepting
    TCP/IP connections on port 5432?

Apparently the script is asking for credentials to an existing/running server?
And a similar things happens for Redis.

Other install guides that I found are:

Any pointers would be great, as I’m mostly guessing now.

Many thanks!