AudioMuse-AI icon indicating copy to clipboard operation
AudioMuse-AI copied to clipboard

[FEEDBACK] Docker compose

Open 123billybob321 opened this issue 1 month ago • 3 comments

Thank you for taking the time to provide feedback! This is incredibly valuable for fine-tuning the software.

1. What were you trying to do? Docker compose tweaks

I'm no docker expert, so please let me know if this seems incorrect. But, in my setup, I have modified the docker compose file and wondered if this would be useful for others.

I've commented out the redis ports as all services are running in the same stack so doesn't need exposing to host (I assume)? Same goes for the ports for the postgres data base.

`# ports:

- "6379:6379" # Expose Redis port to the host`

`# ports:

- "5435:5432" # Expose PostgreSQL port to the host`

I've added this to the postgres database

healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] interval: 10s retries: 5 start_period: 30s timeout: 10s

Which then also allows me to add this to the flask and worker

depends_on: audiomuse-postgres: condition: service_healthy restart: true redis: condition: service_started

As I did have a few times of getting errors as the database wasn't ready before.

123billybob321 avatar Nov 28 '25 14:11 123billybob321

Thanks for reaching me. Can be more precise on which kind of feedback are you giving me?

I mean, is there an issue? or is a suggestion to improve in some way the deployment?

NeptuneHub avatar Nov 28 '25 21:11 NeptuneHub

Sorry no issue.

I made those changes and wondered if they were some improvement but I don't really know docker well enough to know best practise.

123billybob321 avatar Nov 29 '25 07:11 123billybob321

It depends on what you are trying to achieve. If you want to utilize workers across multiple machines, the ports of Redis and PostgreSQL need to be exposed, so the external workers can access them. Otherwise, it would be best practice to remove the ports declaration. Ports exposed in a Dockerfile are automatically exposed to the Docker Network and don't require additional exposing through the ports property.

bannert1337 avatar Nov 29 '25 16:11 bannert1337

Thanks for all your feedback. I'm not looking any action needed on this topic, so I'm going to close.

NeptuneHub avatar Dec 05 '25 17:12 NeptuneHub