How to update the template without a site outage?

Hi, I’m using Ghost for production as a blog, but the other pages I have created in the template manually. Ghost runs using Docker Compose. How do I update the template using the CLI so that I don’t have to run a docker compose restart? This will cause a short site outage.

Thanks for the reply.

It sounds like our GitHub Theme Deploy Action might be a good solution for you: Deploy Ghost Theme · Actions · GitHub Marketplace · GitHub

Generally, uploading/updating a theme can be done from within Ghost Admin and doesn’t result in any downtime.

1 Like

I know about manually updating the template, I’m looking for exactly that option, but automated using the CLI. I’ll take a look at " Deploy Ghost Theme Actions", thanks.

This solution via GitHub is too complicated and slow. Is it possible to update the template locally using docker compose? I use rsync to upload the files to the server and I just need to call re-upload template locally on that server, nothing more. But using docker compose.

The GitHub Action is generally the best way to do it, as it integrates with version control. Once it’s set up, it offers automatic deployment and shouldn’t take too long to roll out. This is a solution for production sites. If you’re working on a theme for development, the process is different.

That being said, there’s also a Themes endpoint available via the Admin API. You could use it to script an upload process:

I use GitHub Actions and it deploys in seconds if updating a few files.

If you are stuck with setting up, I’m sure I can help you out.