Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

1.1 Local setup

Karl Hepworth edited this page Dec 15, 2019 · 20 revisions

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.

Dependencies

If your site is using the GovCMS platform, and you want to develop this site locally, you will need these tools.

Note for Windows

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.

Upcoming opportunities

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)

Building your project

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.)

  1. Validate that you have the tools you need. Refer to these commands for help.

  2. 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 git@projects.govcms.gov.au:ORGNAME/PROJECTNAME.git
cd PROJECTNAME
  1. Build and start the docker containers:
# This is identical to `ahoy up`.
docker-compose up -d
  1. Build the codebase with Composer:
# This is identical to `ahoy composer install`.
docker-compose exec -T test composer install
  1. Install a vanilla GovCMS site:
# This is identical to `ahoy install`.
docker-compose exec -T test drush si -y govcms
  1. 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