Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

composer create-project installer #229

Merged
merged 8 commits into from
Aug 16, 2015
Merged

Conversation

stevenrombauts
Copy link
Member

This PR resolves #64 but needs to be tested first. Because of the private repositories and unreleased bits and pieces, it's a tad complicated to test. The following script should set things up automatically for you.

Note:

  • You should be prompted to pass in your GitHub username and password to gain access to everything
  • Each test run takes quite some time on my end. Don't know how to speed things up yet.

SSH into the Vagrant box and execute:

wget -qO /tmp/setup-satis https://gist.githubusercontent.com/stevenrombauts/3ebcffca6dafbb00a105/raw; chmod +x /tmp/setup-satis; /tmp/setup-satis

This will setup Satis on the box so we can use that Satis repository to access the joomla-platform codebase. Once it's done, run the create-project command as follows:

cd /var/www
composer create-project joomlatools/joomla-platform:dev-feature/64-createproject --repository-url=http://33.33.33.58/satis/web

If successful, platform should be available to joomla.box/joomla-platform/web/administrator

Once things are released, the above command can be shortened to: composer create-project joomlatools/joomla-platform

Things to discuss further:

  • We might want to change phrasing, wording. Maybe add more text after installation (links to documentation, website, ..)
  • Are there other configuration options to prompt for? (log path, tmp path, environment, ..?). It just asks MySQL details for now to get started asap.

@johanjanssens
Copy link
Member

@stevenrombauts

  • About testing. Would it be easier if we make the repos public, test and then make them private again ?
  • About setting up. The information to ask for are the env variables that need to be setup. Those can be found here https://github.com/joomlatools/joomla-platform/blob/develop/.env.example An .env file needs to be created in the root with that data. Would be good if we ask about each of them, we can provide defaults ?

@stevenrombauts
Copy link
Member Author

@johanjanssens Short follow-up:

  • As we discussed on Slack, running the 3 commands above enable testing. Making things public means we also have to create (and remove) Packagist entries each time to test.

  • Added the other options based on the .env.example file. The install process now looks like this:

    example-install

Note: the ASCII logo is in there to grab the attention after Composer is done. There's not a clear distinction between the interactive part and Composer output otherwise. We might want to change that with something else, this is just to get us started.

@johanjanssens johanjanssens added this to the 1.0 milestone Aug 14, 2015
@johanjanssens
Copy link
Member

@stevenrombauts Tested. Excellent work. Process is running as it should.

The only think we could still do in this process is also setup the htaccess file that can be found in the root which will rewrite the document root to /web.

See : https://github.com/joomlatools/joomla-platform/blob/develop/htaccess.txt

Final issue. We should make sure the box recognises the platform installs. Right now it doesn't do this yet.

@stevenrombauts
Copy link
Member Author

@johanjanssens Great, thanks. Added support to the box to recognise platform installs (commit 486b08cae).

About the htaccess in root, it would be useful but there can be a lot of different situations. Example:

  1. if you install it on the vagrant box and access via joomla.box/platform/ instead of vhost, we need to uncomment the domain name conditions + add the /platform/ prefix to /web/ rewrite
  2. If you use virtual hosts, we need to ask the user for the domain(s) so we can correct them in the htaccess file
  3. If someone is running it outside of the box, we have no clue either.

A first solution would be to remove the domain name restrictions but then we still need to know the subpath if there is any. (eg: /platform/web/ instead of /web/)

We could ask for every possible scenario via the interactive installer but that will add a lot of complication we maybe don't need. What do you think?

@johanjanssens
Copy link
Member

@stevenrombauts Agreed.

@johanjanssens johanjanssens merged commit 9a042f9 into develop Aug 16, 2015
@johanjanssens johanjanssens deleted the feature/64-createproject branch August 16, 2015 17:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants