Compare commits
3 Commits
bad31c8a5c
...
c8e7674256
| Author | SHA1 | Date | |
|---|---|---|---|
| c8e7674256 | |||
| dda3414428 | |||
| 1b3f577486 |
10
README.md
Normal file
10
README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Portainer Updater
|
||||||
|
|
||||||
|
Calls portainer's API and updates the images of all currently active stacks
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Update configuration file with your portainer access token and the path of portainer compose directory
|
||||||
|
|
||||||
|
You can then simply execute:
|
||||||
|
|
||||||
|
python main.py
|
||||||
@@ -1 +1,2 @@
|
|||||||
access_token = 'ptr_2Wx6aA26hEEcsPbi2iVyRcuDt6/9tjHlkg+7z9btkjw='
|
access_token = 'example_access_token'
|
||||||
|
portainer_compose_dir = '/absolute/path/to/portainer-data/compose'
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -5,7 +5,7 @@ import requests
|
|||||||
import config
|
import config
|
||||||
|
|
||||||
|
|
||||||
DOCKER_COMPOSE_PATH = '/srv/docker/portainer/portainer-data/compose/{}/docker-compose.yml'
|
DOCKER_COMPOSE_PATH = config.portainer_compose_dir + '/{}/docker-compose.yml'
|
||||||
CURRENT_DIR = os.path.dirname(__file__)
|
CURRENT_DIR = os.path.dirname(__file__)
|
||||||
BASH_COMPANION_SCRIPT = CURRENT_DIR + '/docker_updater.sh'
|
BASH_COMPANION_SCRIPT = CURRENT_DIR + '/docker_updater.sh'
|
||||||
|
|
||||||
|
|||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
requests
|
||||||
Reference in New Issue
Block a user