diff --git a/.gitignore b/.gitignore index 5946060d..30934cbb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,7 @@ _mysites/vendor/* _mysites/console/bin/.files/cache/* /Sites/*/vendor/* /Sites/**/wp-config* -/Sites/**/configuration.php \ No newline at end of file +/Sites/**/configuration.php +!/Sites/pages/configuration.php +/Projects/joomlatools-pages/cache/* +/Sites/pages/administrator/cache/* \ No newline at end of file diff --git a/Projects/.gitkeep b/Projects/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Projects/joomlatools-pages/cache/pages/page_628915681.php b/Projects/joomlatools-pages/cache/pages/page_628915681.php new file mode 100644 index 00000000..3a2e1ada --- /dev/null +++ b/Projects/joomlatools-pages/cache/pages/page_628915681.php @@ -0,0 +1,43 @@ + + array ( + 'hello' => 'hello.html.php', + ), + 'pages' => + array ( + 'hello.html.php' => + array ( + 'path' => 'hello', + 'slug' => 'hello', + 'format' => 'html', + 'hash' => 'f007625f', + 'process' => + array ( + ), + 'route' => 'hello', + 'date' => 1616843837, + 'language' => 'en-GB', + 'metadata' => + array ( + 'robots' => + array ( + ), + ), + ), + ), + 'routes' => + array ( + 'hello' => + array ( + 0 => 'hello', + ), + ), + 'collections' => + array ( + ), + 'redirects' => + array ( + ), + 'hash' => 'c60f2a34', +); \ No newline at end of file diff --git a/Projects/joomlatools-pages/pages/hello.html.php b/Projects/joomlatools-pages/pages/hello.html.php new file mode 100644 index 00000000..b81fcde2 --- /dev/null +++ b/Projects/joomlatools-pages/pages/hello.html.php @@ -0,0 +1,2 @@ +
Welcome to my new page.
\ No newline at end of file diff --git a/README.md b/README.md index 26ac7be5..526a76ef 100644 --- a/README.md +++ b/README.md @@ -1,146 +1,32 @@ - - -# my-sites-ide - -`my-sites-ide` is designed to be an easy way to spin up new php development environments on the fly: - -`composer global require yiendos/my-sites-ide` - -Create new play areas, or you can integrate the IDE into existing projects. Simply navigate to the folder of your choice and run: - -`mysites setup` - -Followed by: - -`[project-name] spark` - -To launch your new play area... See `Your project path is important` below for further details. - ---- - ### Prerequisites Here is the list of prerequisites for your host system: * Docker -* php -* composer - -### Initial setup - -Now you are going to need to add the global `~./composer/vendor/bin` to your path if you haven't already done this. - -To do this temporarily for the session of your terminal screen: - -``` -export PATH=$PATH:~/.composer/vendor/bin -```` - -Or a more permanent solution: - -``` -echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc - -source ~/.bashrc -``` - -Or if you use zshrc: - -``` -echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.zshrc - -source ~/.zshrc && -``` -### Your project path is important +* php (not strictly needed, we could organise things to run off docker-compose alone) +* composer (see above) -Where you choose to install the `my-sites-ide` is important. Let's say you wanted to host sites(s) at: `~/Sites/new-site`: +### Getting started -* This would translate to project path of: -`/Users/somebody/Sites/new-site` - -* With the project name of -`new-site` - -So you would therefore install the `my-site-ide` by issuing the following commands: - -* Create the folder if it doesn't already exist: -``` -mkdir -p ~/Sites/new-site && cd ~/Sites/new-site -``` - -* Install the IDE -``` -mysites setup -``` - -* Launch the IDE -``` -new-site spark -``` - -This can take a while for the first time, we are building apache, nginx, php base images for you. The next time you come to use `mysites setup` for a new project the installation time will be super speedy. - -Then you are able to control the docker instances through commands we've created under the project namespace. So if your project is `new-sites` typing this into the terminal will give you access to these commands. See `Controlling your my-sites-ide` section below. - - -### Apple M1/ ARM64 chip support - -Note if you want to use this on Arm64 chips, we need to handle mysql differently. Currently only mysql:8.0 is supported: - -`mysites setup -f docker-compose-arm.yml` - -### Controlling your my-sites-ide - -We've made working with your my-sites-ide as easy as possible, as part of the `mysites setup` process we also created these commands under the project namespace. - -So once again if your site is hosted at `new-site`, then your new terminal commands will be available under the `new-site` namespace: - -``` -new-site - -Console Tool - -Usage: - command [options] [arguments] - -Options: - -h, --help Display help for the given command. When no command is given display help for the list command - -q, --quiet Do not output any message - -V, --version Display this application version - --ansi Force ANSI output - --no-ansi Disable ANSI output - -n, --no-interaction Do not ask any interactive question - -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - -Available commands: - douse Temporarily pause your sites - export Export a database(s) - help Displays help for a command - list Lists commands - panic Kindle won't launch? This is our troubleshooting command - restart Made changes locally? Restart the corresponding docker container - setup Create the initial mysites configuration file - spark Fire up your mysites IDE - status See the status of mysites containers - wordpress - wordpress:create Create a WordPress site - wordpress:delete Nuke an existing site - wordpress:vhost Creates a new Apache2 and/or Nginx virtual host -``` +1. `cd ~/Sites` +1. `git clone git@github.com:yiendos/my-sites-ide.git` +1. `cd ~/Sites/my-sites-ide` +1. `git checkout feature/16-pages ` +1. `php _mysites/console/bin/mysites setup` (slow first time, building base images... much quicker next pages installation) +1. `my-sites-ide spark` ### Welcome to your new play area -* http://localhost:8080 - apache2 -* http://localhost:8081 - nginx +* http://localhost:8080/pages/hello - apache2 +* http://localhost:8081/pages/hello - nginx * http://localhost:8083 - Mailhog * http://localhost:8084 - phpmyadmin -* http://localhost:3000 - Theia editor +* http://localhost:3000 - Theia editor - Temporarily switched off for this branch to save memory issues on host Database available at: -H 127.0.0.1 - P 3306 root:root We hope you feel at home! - ### Continuous Deployment as Standard `my-sites-ide` came from 8 years working with deployment processes (Jenkins, Travis, github actions) and from this the IDE came into being. So going full circle we've included a barebones github actions integration for you. diff --git a/Sites/index.php b/Sites/index.php new file mode 100644 index 00000000..0c8c0dca --- /dev/null +++ b/Sites/index.php @@ -0,0 +1,24 @@ +Welcome home"; +echo ""; +echo $ascii; +echo ""; diff --git a/Sites/pages/.htaccess b/Sites/pages/.htaccess new file mode 100644 index 00000000..25b89f65 --- /dev/null +++ b/Sites/pages/.htaccess @@ -0,0 +1,92 @@ +## +# @package Joomla +# @copyright Copyright (C) 2005 - 2020 Open Source Matters. All rights reserved. +# @license GNU General Public License version 2 or later; see LICENSE.txt +## + +## +# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE! +# +# The line 'Options +FollowSymLinks' may cause problems with some server configurations. +# It is required for the use of Apache mod_rewrite, but it may have already been set by +# your server administrator in a way that disallows changing it in this .htaccess file. +# If using it causes your site to produce an error, comment it out (add # to the +# beginning of the line), reload your site in your browser and test your sef urls. If +# they work, then it has been set by your server administrator and you do not need to +# set it here. +## + +## No directory listings +