-
Notifications
You must be signed in to change notification settings - Fork 74
1.1 Local setup
This page describes preparing your local environment to run the tools you need for GovCMS, and then setting up a new project.
Since we cater for a variety of developers with different experience, and many are working with limited tools in government, we can't provide perfect documentation for everyone. If you have issues please refer to Getting help.
If your site is using the GovCMS platform, and you want to develop this site locally, you will need these tools.
We are trying to improve the Windows experience. Most commands need to be carried out in Powershell but some may require Git-bash. Use both tools with elevated permissions. DOS prompt is not appropriate for local development.
See also the Amazee docs as well as the Windows-specific tips in this user contributed guide.
There is a trial version of Pygmy written in Go.
This will help to address many of the common issues users have had with Pygmy in the past including:
- Windows support (which may help Windows users who cannot install Ruby gems at present).
- Granular control over ports and services (run Pygmy on HTTPS with no effort; run phpmyadmin/portainer as well)
These instructions will help you set up your project locally. It assumes that you have been provisioned with a GovCMS project in Gitlab. (If you have not been provisioned with a project, you can test this process by installing the scaffold and skipping to step 3.)
-
Validate that you have the tools you need. Refer to these commands for help.
-
Clone your project's Gitlab repository. The clone URL can be found at https://projects.govcms.gov.au/ORGNAME/PROJECTNAME
Your should ensure that the location of your clone is included in Docker's file sharing.
git clone [email protected]:ORGNAME/PROJECTNAME.git
cd PROJECTNAME
- Build and start the docker containers:
# This is identical to `ahoy up`.
docker-compose up -d
- Build the codebase with Composer:
# This is identical to `ahoy composer install`.
docker-compose exec -T test composer install
- Install a vanilla GovCMS site:
# This is identical to `ahoy install`.
docker-compose exec -T test drush si -y govcms
- You should have a running site now, which you can visit at http://PROJECTNAME.docker.amazee.io. To login to Drupal as user 1 you can run:
# This is identical to `ahoy login`.
docker-compose exec -T test drush uli