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

Hey :slight_smile:

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! :blush:

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.

1 Like

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

(Sorry, i‘m really new to cockpit :smiley:)

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…

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.

2 Likes

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

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

2 Likes

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

#!/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

4 Likes

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?

Not really - addons/ are gitignored.

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

1 Like

Sorry, I’m kind of at a loss here, haha :smiley:
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 :smiley:
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 :slight_smile: But I well understand if you have no time for that.

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.

1 Like

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

1 Like