da585d4b17f9b2671ee43a12773004c1f6ffa208
Docker Compose Repository: Portainer
This repo contains a docker compose file to deploy Portainer Community Edition
Deployment
- Clone the repository
cdinto 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 pulldocker compose up -d
Automatic updates via cron
This repository contains an update script 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
stderrare redirected tostdout - Output is piped to logger, tagged as
portainerupdate- It can be viewed with
journalctl -t portainerupdate
- It can be viewed with
Description
Languages
Shell
100%