[x] Have portainer manage the ops stack in a GitOps way
[x] Make sure the Portainer-config is code as well (maybe add the stacks through API calls instead of the web ui)
[x] Portainer state should survive a reboot (otherwise portainer will handle all stacks started by itself as started from outside after a re-start)
[x] Update docs - how to add docker stacks & diagram ... add to inline docs and link from some how-to page
Problems (and possible solutions), ideas, etc.
[x] Access Token does not survive restarting the container (when the image is removed) ... So I somehow have to set the access token for my admin user from outside (and make sure the token is static and does not change)
[x] Maybe use the /auth endpoint and retrieve a JWT token (store inside collection var and use in other subsequent requests) ... This way I would need to authenticate with username and password (which are both static information)
[x] Create a Postman collection and run with Newman in a different container (from the same compose stack) after Portainer is up and running
[x] This can also be used to validate that Portainer is set up as expected ... Implement some tests
[x] There is no need to tear down the ops stack before creating it. Portainer first recognizes this stack but cannot control it. When the stack is created from postman, Portainer can control it completely.
Acceptance criteria
ops
stack in a GitOps wayProblems (and possible solutions), ideas, etc.
/auth
endpoint and retrieve a JWT token (store inside collection var and use in other subsequent requests) ... This way I would need to authenticate with username and password (which are both static information)/auth
should be the first requestops
stack before creating it. Portainer first recognizes this stack but cannot control it. When the stack is created from postman, Portainer can control it completely.See also