Closed ZaxLofful closed 10 months ago
Hostname only applies to DNS resolution inside the container itself, it doesn't affect the routing of outside networks or other containers.
Setting container_name will set both the name of the container and the Docker Internal DNS routing of all containers to the generic name.
Thus achieving both naming convention and DNS resolution.
There are a few inconsistencies in the way code is written and also a volume that isn't needed.
There is also a spacing problem for the .env file, which docker-compose hates