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


#1

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:


#2

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.


#3

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…


#4

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.


#5

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


#6

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


#7

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


#8

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?


#9

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.


#10

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.