joomlatools / joomlatools-pages

Joomlatools Pages is an easy to use page generator (for Joomla)
GNU General Public License v3.0
48 stars 9 forks source link

Add GitPod support #321

Closed yiendos closed 4 years ago

yiendos commented 4 years ago

See if this service can make getting started with com_pages smoother for the beginner. Avoiding the need to set up a LAMP stack, installing a vagrant box etc.

https://www.gitpod.io/

Would seem to make it very easy to demo pages when we are invited to talk about it. It's Docker + Theia IDE from Eclipse foundation.

The docs explain how you can make any repo ready for Gitpod: https://www.gitpod.io/docs/ and i found a few examples for LAMP and Wordpress:

Update following discussions on Slack 30th April 2020

1. joomlatools-gitpod

This repo would be our way of giving something back to the community. In it, the prospective users of Joomla could fire up a version of Joomla and sample data easily and see if it fits their needs.

There would be little in the way of this repo, apart from the code to run gitpod and docker. The joomlatools-console would then be used to fire up a specified version of J!... as per defined in the Dockerfile and the branch/issue/ticket the pod was fired up from.

If no Joomla version constant is provided the latest version is simply installed.

The editor in this playground should focus on the installed J! files.

2. pages-playground

Which would take the base image created from joomla-gitpod and then extend and make it possible to play around with pages.

It is envisaged that a series of issues/tickets/ branches are created for each demo of. the pages system that we would like to create. Much like we handled the com_todo demo on the framework.

That way the associated blog posts can reference specific commits.

The editor in this playground should focus on editing pages and these will then be symlinked into the existing J! site.

If it is possible, we could include the J! as a workspace dependency so the files could be easily found if necessary.

pages-playground should fork and extend joomla-gitpod and by the same token pages-playground should be forkable too. Ensure this work flow is tested and works.

stevenrombauts commented 4 years ago

@yiendos I think I'm almost there, just need to get the bootstrap file to be run before the workspace is started (init), for some reason it doesn't do that.

If you open up the workspace in its current state at https://gitpod.io/#https://github.com/joomlatools/joomlatools-pages/tree/feature/321-gitpod, then you'll need to run bootstrap using this command in the Terminal:

./.gitpod/bootstrap.sh 

After that, the Preview pane will have a working Joomla site. Now it just needs to have Pages and FW installed.

yiendos commented 4 years ago

@stevenrombauts thank you! I was struggling with this one, check I'll shall make so

stevenrombauts commented 4 years ago

@yiendos @johan Just a quick thought here, to share this with people regardless of their skill level I would still consider doing this in a separate repository that already has a Joomla site set up. This way the code repository root's directory layout mirrors what they already know. I think that will make it much easier for people to get started in general?

Alternatively, it might be possible to simply set the Workspace root to the newly created Joomla site (see https://www.gitpod.io/docs/checkout-location/), so the Gitpod workspace just shows the Joomla directory layout.

yiendos commented 4 years ago

@stevenrombauts thanks for this, I was about to explore the possibilities of setting up project workspace/ dependencies much like we do with phpstorm today. I think we'd only need to set up the IDE workspace to look for these dependencies on start up. Of course we'd have to set. up a new vhost and change permissions over /var/www/ but this would mirror how we develop locally on the box.

I'm not a great fan of just dumping the site into the preview folder either, which is the way the gitpod images seem to want to force you to do. Apart from anything else when the site is first built, the IDE has to go away and map all the newly created files in the project space.

Nice link about the checkout-location didn't know about this, something else to look into.

stevenrombauts commented 4 years ago

@yiendos Agreed on that.

The preview directory is something we choose ourselves, so we can change it to whatever. To get it out of the way, I would actually move it to /home/gitpid/.

I'm not sure if we can make /var/www work because of the permissions (it will be owned by root). The home directory for the gitpod user will probably be a safer bet.

If we can get the site in there, we can also move the workspace's default location there, and we would have a working Joomla site with all the code ready to go.

johanjanssens commented 4 years ago

@stevenrombauts @yiendos I would prefer that we work from generic to specific. Looking at:

They created a single repo that can setup a whole Wordpress site with a single click in Gitpod. Could we do joomlatools-gitpod?

Installing pages into that on the fly shouldn't be that hard right? We would need to tell it to provision that Joomla with Pages?

yiendos commented 4 years ago

@johanjanssens check ticket description has been updated. As discussed on Slack we will continue with our current development trajectory and once we've got everything humming along as we like, we'll then split the developments across two repos.

yiendos commented 4 years ago

Note

Closing this issue because the work has been moved into their respective repos. See:

https://github.com/joomlatools/joomlatools-gitpod https://github.com/joomlatools/joomlatools-pages-playground