Open jzakotnik opened 3 weeks ago
Hi @jzakotnik I believe that in order to accomplish this we will need to introduce new piece of infrastructure on the level of server where docker is running.
Here's a high-level description of the solution:
Host-Level Script:
upgrade.sh
) on the host machine that:
Host-Level API Service:
upgrade.sh
script.Backend Service:
Frontend Integration:
Secure Communication:
User Interaction:
Frontend Request:
Backend Processing:
Host-Level Execution:
upgrade.sh
script to update the environment variables, pull the new images, and restart the services using Docker Compose.By following these high-level steps, you can set up your infrastructure to support an "Upgrade" button on the frontend, allowing seamless upgrades of your Docker-based application.
graph TD;
A[Frontend] -->|1. Click 'Upgrade' Button| B[Backend Service];
B -->|2. Send Version Tag| C[Host-Level API];
C -->|3. Trigger upgrade.sh| D[upgrade.sh Script];
D -->|4. Update .env and Pull New Images| E[Docker Compose];
E -->|5. Restart Services| F[Docker Services];
style A fill:#f9f,stroke:#333,stroke-width:4px;
style B fill:#bbf,stroke:#333,stroke-width:4px;
style C fill:#f96,stroke:#333,stroke-width:4px;
style D fill:#ff9,stroke:#333,stroke-width:4px;
style E fill:#96f,stroke:#333,stroke-width:4px;
style F fill:#6f9,stroke:#333,stroke-width:4px;
Discussed in https://github.com/openkfw/TruBudget/discussions/1754