Cockpit + React Static Demo Project


#1

Hey Cockpit community!

Since lots of people are asking about how to build websites using cockpit I started a Demo project, based on the Layout components and other addons. The frontend is built on React Static approaching a concept of a React component for each Cockpit core/custom component.

Hope that can help others and raise the interest on cockpit.

Project code is on https://github.com/pauloamgomes/CockpitCMS-React-Static
Demo site is on https://pauloamgomes.github.io/CockpitCMS-React-Static

A local installation will contain the exact same contents of the above demo.

Feedback is appreciated.


#2

@pauloamgomes this is awesome! thank you for setting this up and sharing! :raised_hands::+1:


#3

As a cockpit newbie I am very interested in your Demo project.
But before I try it, I must say that I use Ubuntu 18.04 and avoiding to install docker.
I don’t see the need for docker; seems to me that lxd is the choice for a virtualization tool in Ubuntu and I don’t want to duplicate.
So the question is: what I am saying makes sense? If yes, would it be hard for me to try to use lxd instead of docker in your project? Would you consider doing it in the future?
Thank you for any answer
João Franco


#4

Hi Joao,

Thanks for trying it! Docker runs both on MacOs, Linux, Windows, so for me and for this kind of projects the way to go. Be free to use whatever you feel is right for your own work, to run the cockpit part of the demo, you just need to have a webserver and php configured.

Best
Paulo


#5

Docker is awesome tool to keep your host computer clean of unnecessary things, like idle running mysql’s and nginx services all the time. You are able to use those services on demand using Docker.

Therefore, I really love using Docker and still trying to find the best solution for my self using Cockpit CMS with Mongo DB etc.

Yet again, thanks @pauloamgomes


#6

I followed your advice and after trying cockpit part of your Demo (very helpfull) in Ubuntu 18.04 (where I don’t have Docker, only lxd) I switched to Manjaro Linux (no lxd), installed Docker and run your full Demo.
Awesome! Thank you!
Yet, I have many questions to ask in this forum.
For now, only one:
You made me adopt the Cockpit path for headless cms, but what about other paths,
specifically Grahpcms? I feel I must choose one of these.


#7

I have posted some basic questions in Category General/Topic Welcome to new …
I quote an excerpt: “I notice that Demo from Paulo Gomes, uses for his example config and storage.zip files; howto load different files for different customers?”


#8

I think I found it, reading the Demo cockpit install.sh
Now I have to find how to switch to another example: backup current example (files config, storage.zip) and clean these (HOWTO?) before loading another example.


#9

There are many @joaomfranco, GraphCMS, Prismic, Contentful, etc… but most of them are cloud solutions (CaaS - content as a service). You can have an overview on headless solutions here: https://headlesscms.org


#10

Keep in mind that the Demo main purpose is to demonstrate the usage of Cockpit with a static generator, and not to be used as a final project (however it would be possible). You can just clone again the repo, rename the docker containers (in the docker compose file) and remove the contents of your storage folder (the structure of collections, contents and assets are inside the storage).