

Well, someone needs to run docker compose up
, right? (or you set restart policy, but that’s not always possible)
Well, someone needs to run docker compose up
, right? (or you set restart policy, but that’s not always possible)
systemd has nothing to do with docker, except to start the docker daemon.
I think what OP was describing was writing systemd unit files that would start/stop docker containers.
one way to achieve this would be to push all sources over to the Raspberry Pi, build the docker image on the Raspberry Pi, give the docker image a ‘latest’ tag and use Systemd with Docker or Podman to execute the image.
I do it almost exactly like this, except instead of systemd I just start containers with --restart unless-stopped
.
I’m also looking at improving the current setup, but haven’t really made any progress. I’m thinking of setting up a GitOps type workflow, e.g. as described here: https://medium.com/linux-shots/gitops-on-docker-using-portainer-8712ba7d38c9 (disclaimer: I haven’t tried these instructions myself)
I actually have no sense how common that is. My experience is with very small non-production docker environments, and with Kubernetes, but I have no idea what people typically do in between.