# Best way to stay up-to-date with Plugins & Core?

**URL:** <https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605>\
**Category:** Support\
**Created:** [February 25, 2019, 11:28am UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605 "2019-02-25T11:28:13Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dennzimm](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/dennzimm/32/253_2.png) [@dennzimm](https://discourse.getcockpit.com/u/dennzimm)\
**Post date:** [February 25, 2019, 11:28am UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/1 "2019-02-25T11:28:14Z")

</div>

Hey 🙂

Is there a good way to stay up-to-date with the installed / cloned Plugins & Core?  
There is no update mechanism, right?

So, should I consider to use something like git-submodules / subtree?

I’m new to Cockpit and try to find a way to organize everything with git.

Thanks in advance! 😊

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [February 25, 2019, 9:42pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/2 "2019-02-25T21:42:44Z")

</div>

For core, usually, I use a forked repo, so any updates are first checked there. For Addons its a bit more tricky as some not follow exactly the same folder pattern and most of them don’t have versions.  
Tbh git-submodules can be a bit overcomplicating and cause some headaches, subtree would be maybe a better option.

---

<div class="post-metadata">

**Author:** ![dennzimm](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/dennzimm/32/253_2.png) [@dennzimm](https://discourse.getcockpit.com/u/dennzimm)\
**Post date:** [February 26, 2019, 3:53pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/3 "2019-02-26T15:53:06Z")

</div>

May I ask if you have a special Worflow when you start a new Cockpit-Project?

(Sorry, i‘m really new to cockpit 😃)

You already mentioned that you fork the cockpit-repo.  
Do you use the Dockerfile from the repo?

You probably also adapt the .gitignore, right?  
By default the addons folder and the storage folder are ignored.

And what about deployment?

Unfortunately, the documentation is not that good…

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [February 26, 2019, 5:14pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/4 "2019-02-26T17:14:44Z")

</div>

Hi @dennzimm,

I’m using my own docker configuration (based on wodby php/nginx images).  
I didn’t change the .gitignore file, everything inside in storage should not be committed.  
Deployments can be performed as any other php application, just make sure you test any cockpit core updates before pulling them in the environment. I have a config.yaml per environment that is also not committed.

Documentation can be in fact improved, but if you take into consideration that is almost the effort of only one person (@artur) is already something.

---

<div class="post-metadata">

**Author:** ![gstar](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@gstar](https://discourse.getcockpit.com/u/gstar)\
**Post date:** [February 27, 2019, 6:39pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/5 "2019-02-27T18:39:28Z")

</div>

Do you know if there is any reason why Cockpit does not offer the ability to be installed/updated via Composer?

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [February 27, 2019, 6:54pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/6 "2019-02-27T18:54:09Z")

</div>

Check that thread - [https://github.com/agentejo/cockpit/issues/915#issuecomment-436521678](https://github.com/agentejo/cockpit/issues/915#issuecomment-436521678)  
tbh, don’t see a need to have it being managed by composer

---

<div class="post-metadata">

**Author:** ![Blistok](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/blistok/32/212_2.png) [@Blistok](https://discourse.getcockpit.com/u/Blistok)\
**Post date:** [March 3, 2019, 6:06am UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/7 "2019-03-03T06:06:09Z")

</div>

I’m using both cockpit core and all plugins as git repos. The update then simply becomes git pull. And since I started using more than couple addons, it became bothersome to cd into each addon folder, so I’m using this simple shell script to “auto update” everything with single command:

`./update.sh`

```auto
#!/bin/bash

# update cockpit
git pull origin next

# update addons
for d in addons/*/ ; do
	cd "$d"
	echo "==============="
	echo "$d"
	git pull origin
	echo "---------------"
	cd ../../
done

```

---

<div class="post-metadata">

**Author:** ![dennzimm](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/dennzimm/32/253_2.png) [@dennzimm](https://discourse.getcockpit.com/u/dennzimm)\
**Post date:** [March 4, 2019, 2:50pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/8 "2019-03-04T14:50:31Z")

</div>

So you have git repos in a git repo?  
Wouldn‘t it make more sense to use git subtree?  
(You a question - I’ve never used git subtree)

What about deployment? Do you use deployer or something for that?

---

<div class="post-metadata">

**Author:** ![Blistok](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/blistok/32/212_2.png) [@Blistok](https://discourse.getcockpit.com/u/Blistok)\
**Post date:** [March 4, 2019, 4:33pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/9 "2019-03-04T16:33:21Z")

</div>

Not really - `addons/` are [gitignored](https://github.com/agentejo/cockpit/blob/next/.gitignore#L24).

RE: deployment: I’m not really deploying cockpit - I’m using it only as a build time data source for GatsbyJS app.

---

<div class="post-metadata">

**Author:** ![dennzimm](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/dennzimm/32/253_2.png) [@dennzimm](https://discourse.getcockpit.com/u/dennzimm)\
**Post date:** [March 4, 2019, 6:25pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/10 "2019-03-04T18:25:26Z")

</div>

Sorry, I’m kind of at a loss here, haha 😃  
When they’re ignored, how can you `git pull` them with the script?

> I’m using it only as a build time data source for GatsbyJS app.

That’s exactly what I’m looking for 😃  
But I don’t know how to go from local cockpit to production (db, content syncing / test local → push to staging / production → core / addons up-to-date etc…) as easy as possible.

Would you mind to write down how you go from local to production with Cockpit and Gatsby? That would be great 🙂 But I well understand if you have no time for that.

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [March 25, 2019, 7:26pm UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/11 "2019-03-25T19:26:40Z")

</div>

> [@pauloamgomes](#):
>
> For Addons its a bit more tricky as some not follow exactly the same folder pattern and most of them don’t have versions.

I thought a while about it and now I moved from subfolders in my addons to having the whole addon in the root of the repositories. I also added version numbers at the top of bootstrap.php. So now it should be possible to use the `git clone` and `git pull` workflow with all of my addons, too.

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [March 26, 2019, 10:09am UTC](https://discourse.getcockpit.com/t/best-way-to-stay-up-to-date-with-plugins-core/605/12 "2019-03-26T10:09:58Z")

</div>

Yeah, sounds good 🙂 we should insist with @artur on having an addons directory or something similar
