From 79057e8450bc879f1096f11a754143f59b0c9e07 Mon Sep 17 00:00:00 2001 From: Akumatic Date: Thu, 10 Apr 2025 22:17:14 +0000 Subject: [PATCH] Add README.md --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..31c56de --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# Docker Compose Repository: Portainer + +This repo contains a docker compose file to deploy Portainer Community Edition + +## Deployment + +- Clone the repository +- `cd` into the cloned folder +- Deploy the stack via `docker compose up -d` + +## Updating + +Since Portainer cannot manage stacks that were created outside of itself, updates must be handled separately. + +The necessary steps are: + +- Update tag in `docker-compose.yaml` +- `docker compose pull` +- `docker compose up -d` + +### Automatic updates via cron + +This repository contains an [update script](update.sh) for use with cron. It checks whether the remote had new commits that are not present locally. If this is the case, it pulls from remote and redeploys the stack. + +For example, the following entry can be useed to set up a user cron job with `crontab -e` + +``` +15,45 * * * * /srv/portainer/update.sh 2>&1 | logger -t portainerupdate +``` + +- The repository is stored in `/srv/portainer` + - The path of the update script is `/srv/portainer/update.sh` +- The script runs every 30 minutes at minute 15 and 45 +- Messages from `stderr` are redirected to `stdout` +- Output is piped to logger, tagged as `portainerupdate` + - It can be viewed with `journalctl -t portainerupdate`