The docker-compose is not the intended way to deploy Penpot in a self-hosted. That docker-compose is thought for creating a development environment and that’s why the service “main” is not started automaticaly. Usually in a developmente environment you want that service to have a terminal so you can inspect the logged output (for compilation or runtime errors etc)
Andrés wrote some nice articles about self-hosting Penpot: