Compare commits

...

16 Commits

Author SHA1 Message Date
3e794d161c Update portainer/portainer-ce Docker tag to v2.31.0 2025-06-12 00:01:56 +00:00
73727c627f Update portainer/portainer-ce Docker tag to v2.30.1 2025-05-20 08:01:40 +00:00
da585d4b17 Update portainer/portainer-ce Docker tag to v2.30.0 2025-05-15 00:01:39 +00:00
dc1da1989d Update portainer/portainer-ce Docker tag to v2.29.2 2025-04-24 07:55:31 +00:00
271fc8ba99 Update portainer/portainer-ce Docker tag to v2.29.1 2025-04-23 00:02:11 +00:00
fc8a526637 Renovate: Enable automerge without tests 2025-04-16 07:24:14 +00:00
bf4b6659ee Merge pull request 'Update portainer/portainer-ce Docker tag to v2.29.0' (#4) from renovate/portainer-portainer-ce-2.x into main
Reviewed-on: #4
2025-04-16 07:23:21 +00:00
cf8ad5e8db Update portainer/portainer-ce Docker tag to v2.29.0 2025-04-16 00:02:42 +00:00
72e904fb63 Change check for update condition
Instead of fetching from remote, it now only compares HEAD from local to HEAD of the current branch on remote
2025-04-11 13:01:04 +00:00
60486b2abd Edit Renovate config
- Allow configMigration
- Allow automerge for minor and patch
2025-04-11 09:33:07 +00:00
0c5969af8c Merge pull request 'Update portainer/portainer-ce Docker tag to v2.28.1' (#2) from renovate/portainer-portainer-ce-2.x into main
Reviewed-on: #2
2025-04-11 09:27:34 +00:00
a6fb1aa4d4 Update portainer/portainer-ce Docker tag to v2.28.1 2025-04-11 00:01:59 +00:00
24553291ef Change text of automatic updates 2025-04-10 22:22:28 +00:00
79057e8450 Add README.md 2025-04-10 22:17:14 +00:00
549b4ce39c Fix docker commands 2025-04-10 21:25:23 +00:00
de45ba5398 Portainer updater script for docker compose 2025-04-10 16:22:00 +02:00
4 changed files with 57 additions and 1 deletions

34
README.md Normal file
View File

@ -0,0 +1,34 @@
# 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 used to set up a user cron job with `crontab -e`, assuming that the repository is stored in `/srv/portainer`.
```
15,45 * * * * /srv/portainer/update.sh 2>&1 | logger -t portainerupdate
```
- 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`

View File

@ -2,7 +2,7 @@ name: portainer
services:
portainer-ce:
image: portainer/portainer-ce:2.27.3
image: portainer/portainer-ce:2.31.0
container_name: portainer
restart: unless-stopped
volumes:

View File

@ -2,5 +2,14 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"labels": ["renovate"],
"configMigration": true,
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"automerge": true,
"ignoreTests": true
}
]
}

13
update.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
cd $(dirname $0)
local_head=$(git rev-parse HEAD)
upstream_ref=$(git rev-parse --abbrev-ref @{u} | sed 's/\// /')
remote_head=$(git ls-remote $upstream_ref | cut -f1)
if [[ $local_head != $remote_head ]]; then
git pull
docker compose pull
docker compose up -d
fi