This is a Docksal-based for the Open Y Drupal distribution.
Docksal is used as a local development environment.
You need to install Docksal on your local machine according to Docksal setup instructions.
Note: a local instance of PHP and/or Composer is not required.
Follow these steps to get fully prepared project.
curl -fsSL https://get.docksal.io | bashgit clone git@github.com:ymcatwincities/openy-docksal.git- Create
docksal-local.envfile inside.docksaldirectory with content:
OPENY_PROJECT_VERSION='9.2.x'
OPENY_VERSION='9.x-2.x'
GIT_REMOTE_UPSTREAM='git@github.com:USER/openy.git'
IGNORE_CUSTOM='.idea'-
Use
OPENY_PROJECT_VERSIONto specify the branch of theymcatwincities/openy-projectto be used as a composer project. In the most cases you'll need:9.2.xfor a last stable openy release.9.2.x-developmentfor a latest development openy.
-
Use
OPENY_VERSIONto specify the branch of theymcatwincities/openywill be checkout automatically. Take in mind, the openy version corresponds the one, required in a rootcomposer.json. Use9.x-2.xto start the development from the latest openy progress. -
Replace
USERby your user name from github or removeGIT_REMOTE_UPSTREAMif you don't need an upstream repository to be set automatically. -
During an execution of a
build_projectcommand, all the directories except an ignored ones would be deleted. If you work on the existing project and want to save any folder in a project root directory - add folder name toIGNORE_CUSTOM. Directories names should be separated with spaces.
If you want to use your fork as an origin remote and the main repository as an
upstream remote, add the following variables to the docksal-local.env file
as follows:
GIT_REMOTE_UPSTREAM='git@github.com:ymcatwincities/openy.git'
GIT_REMOTE_ORIGIN='git@github.com:USER/openy.git'In this case, after project install git will already track the repositories
you specified as origin and upstream remotes
Run this command inside your project directory:
fin build_projectAs a result you will get full Open Y installation in your file system.
The "Killed" message during command run usually means that you need to increase memory limits in your Docksal. For macOS or Windows overall memory volume available for Docker is limited by the virtual machine or Docker Desktop settings.
After fin build_project command finish you need to install a site. For this
you can use one of this commands:
fin initfin install_stepsfin upgrade_init
More details about these commands you can get below.
# Install Docksal
curl -fsSL https://get.docksal.io | bash
# Change directory to your workspace
fin run-cli composer create-project ymcatwincities/openy-project openy --no-interaction --no-dev
cd openy
fin run-cli composer install
fin initOpen the URL printed at the end of the setup (e.g. http://openy.docksal) to see your local copy of the latest stable Open Y.
Open the project's folder and run one of the commands.
Administrator account is admin:admin.
fin initThe webserver starts up, and the site will be installed automatically with drush si.
fin install_stepsThe webserver starts up and for site will be provided base configuration. After finish you need to open site in browser and continue installation from UI. This command is useful for testing Open Y install form.
fin upgrade_initThe webserver starts up and the site will be installed from Open Y DB dump that contain pre-installed previous Open Y version. After installation will be executed all new updates that were added in the latest Open Y versions.
More information about the upgrade path you can find here - How to support upgrade path
After you run the "fin init" and have your environment ready you need to do few things.
- Create a fork of http://github.com/ymcatwincities/openy.
- In your project go to
docroot/profiles/contrib/openyand edit.git/configfile. Replace repo URL to your newly created fork. - Then you can create a branch in your repo, push some code and create a pull request back to
ymcatwincities/openyrepo.
Edit behat.local.yml and set base_url to web and wd_host to http://browser:4444/wd/hub.
Then you can run your behat tests with ./vendor/behat/behat/bin/behat.