When I look at the docker-compose file, I notice that some services contain restart: always to automatically start on boot, but not all services do. This is especially true for the service penpot-frontend. Why is that? Shouldn’t it contain this attribute/policy?
The reason I ask, is that I would like to start Penpot when the system (re-)boots. What would be the best way to achieve this? I could of course add the attribute/policy to all the services in the docker compose file, but maybe there is a (good) reason why this hasn’t been done?
Some context: Penpot is running with Docker on RHEL 9.
Yours sincerely,
Verhoeckx
PS. I looked for a solution on the website of Penpot, but couldn’t find it.
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:
Oh, sorry but I have the impression that we do not completely understand each other. I have the impression that you think I’m running Penpot on a desktop? What do you exactly mean with self-hosted? My interpretation of self-hosted, is that you run Penpot on a server, exactly the same as Penpot itself is doing (or aren’t they using Docker in production?).
In my case I’m running Penpot on a server together with other Docker applications (i.a. Nextcloud AIO and OpenVSCode). The server runs on Red Hat Enterprise Linux and when I reboot the server all the containers are automatically started except those of Penpot.
Container penpot-exporter - does not start automatically
Container penpot-backend - does not start automatically
Container penpot-frontend - does not start automatically
Why has the attribute restart: always not been added to the containers penpot-exporter, penpot-backend and penpot-frontend? Is this a bug or is there a good reason for not doing so?
So solve my problem, I could of course add the attribute to the other services, but I think/believe they should be there in the first place? Ideally, a docker-compose file should not be changed after downloading, because this makes updating an application cumbersome (okay, this is bit of an exaggeration).
If your are going to change the docker-compose file, it’s maybe also a good idea to add the name directive for giving the instance a project name. This way you don’t have to add it ( -p penpot) to the docker compose command (but this maybe not a good idea when you are going to run multiple instances of Penpot).
Good news: a developer of Penpot has added the attribute restart: always to all services!
This means that all containers are now started automatically when the system reboots! Yeah !