Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save stack compose without updating the stack #2732

Open
gbhrdt opened this issue Feb 22, 2019 · 19 comments
Open

Save stack compose without updating the stack #2732

gbhrdt opened this issue Feb 22, 2019 · 19 comments

Comments

@gbhrdt
Copy link

gbhrdt commented Feb 22, 2019

Is your feature request related to a problem? Please describe.
Often I modify a single service inside my stack (Env, Label, ...) and want to persist this change inside the stack's compose file, but I don't want to re-deploy the whole stack and restart all services.

Describe the solution you'd like
A simple "Save file" button next to the "Update the stack" button.

Describe alternatives you've considered
You can edit the file directly inside portainer's volume but via portainer's UI would be so much easier.

Additional context
Mockup:
screenshot 2019-02-22 at 17 14 24

@deviantony
Copy link
Member

deviantony commented Feb 24, 2019

Hi @gbhrdt

Updating a single service in the stack file and hitting update the stack should normally redeploy the updated service only and not all the services in the stack.

Based on this behavior, I'm not sure that this feature request is actually needed.

@cyberlink1
Copy link

cyberlink1 commented Feb 26, 2019

Anthony,

I have wished I could do that as well. Though it is more so I can stage a production change before the outage window and then just select the services during the outage window and update them.

Though the ability to designate a blue/green deployment would be another solution to the issue.

@deviantony
Copy link
Member

@cyberlink1 how is it related to the ability to save a stack without deploying it? What prevents you from preparing the changes and using the "Update the stack" button during the outage window?

@gbhrdt
Copy link
Author

gbhrdt commented Feb 26, 2019

@deviantony You're totally right, the services are not all being restarted.
But there are still cases (like @cyberlink1 said) where you want to "prepare" changes to the stack file in portainer before updating the stack. I use the portainer compose editor heavily and sometimes I have stuff to change at the compose files (e.g. some new ENV vars) but don't want to restart the associated service. So what I miss is the ability to prepare those stack changes directly in portainer.

@cyberlink1
Copy link

@cyberlink1 how is it related to the ability to save a stack without deploying it? What prevents you from preparing the changes and using the "Update the stack" button during the outage window?

Make the changes during the day at work, then shutdown the laptop and deploy the changes in the evening during the outage window. If you cant save it, it will not be there later.

Though thinking about this and mulling it over I wonder if it would be better to be able to save to and pull the stack yaml from a repo like gitlab. At least that way there would be a way to back them up should you also have the issue in #2731

@deviantony
Copy link
Member

Maybe related to #1753 instead of #2731 ?

@dreylok
Copy link

dreylok commented Dec 14, 2022

Adding on my two cents about this feature request. This missing functionality really surprised me. How can I stage changes to multiple stacks, but only commit them later when in a maintenance window? Sometimes it's just a small correction to the name of an output file, backup setting, etc and I'm fine if it just gets picked up the next time the stack is restarted for another reason. I can't make a change, save it for later, and change another stack. I'm stuck on that Editor screen until I either abandon the changes or update the stack.

Same functionality as the button we already have but leaves out the step to update the affected services. Seems straightforward?

EDIT: Another related issue: updating the stack always automatically starts the stack, even if the stack was stopped when the edit was made. Then I'm forced to wait the screen to refresh, then stop the stock.

@Mizar01
Copy link

Mizar01 commented Feb 22, 2023

I'm a little sick about this... always copying/pasting/editing docker-compose settings and config in order to avoid to do all that during a maintenance window.

It is useful though to see the exact configuration actually running, so the original config should be visible elsewhere, while the one I see in the editor should be editable without beeing forced to restart everything.

@EHRETic
Copy link

EHRETic commented Jun 28, 2023

Hi there,

To keep this open request alive: if I might add : it would be very nice if we could create "drafts" at some points without redeploying.
Quite frequently and especially during prep work, I would like to save some modifications without deploying and it's not possible.

So +1 for this functionality! 😉

@Raeitus
Copy link

Raeitus commented Jul 24, 2023

Another reason why this would be good is for people who uses a compose set up where they also type in their username and password into the compose file. Being able to erase that part and save it as "changeme" or the like helps it not just sit there.

@bob454522
Copy link

Also surprised this does not exist- i was trying to build / setup a new docker environment (and this time use entertainer), and didnt want to deploy yet.

also the specific app was setting up needed 2x separate docker-compose files, thus i wanted to save both, setup their proper environmental vars, and then when i was ready, deploy them. (but i dont see where that is possible in portainer)

@FlyingEagle
Copy link

Do I miss this feature in the GUI or isn't it in yet?

@BernCarney
Copy link

👍

@bob454522
Copy link

bob454522 commented Dec 15, 2023

Do I miss this feature in the GUI or isn't it in yet?

it still does not exist yet- It's not clear why, but one still has to deploy or re-deploy anytime editing a compose file in portainer.
(unfortunate in my opinion, and hopefully this will change) , If I had the coding skills to implement this I would issue a PR with changes.

One use-case where this is frustrating:
if for example one needs to simply add a comment (# xyz) to their compose file in portainer you have to either start up that entire stack or restart an already running stack just to add in that comment

@Nikotine1
Copy link

+1

@rmayergfx
Copy link

plz take care on this topic. it ist very important to save changes without deploy immediately.
Sometimes changes are already made in the Docker and for documentation or later reinstall some kind of e.g. Environment variables are added, but no need to deploy, just saving would be enough!

@LikeTheSalad
Copy link

Sometimes is useful to take a look at other stack files to copy some values from them or get a reference to be able to finish creating a new one, other times it could be useful to "inspect" the file to make sure the env vars I used were added properly. I currently cannot do so without losing my changes for the new stack file, it's odd that this functionality isn't there already considering that the files do get saved when deployed, it seems it's just a matter of providing a button that calls the "save file" function that should already exist.

@masking-duck
Copy link

+1

@Avatar007z
Copy link

+1
We need to be able to stage changes ...
I am literally updating the stack to add a comment, so I do not really need any containers restarted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests