Since this is a Drupal site, it can be launched with any Drupal development tool.
For regular development, the DSVA team uses ddev for local container management.
For testing and simple development, you can use the special Composer commands and Drupal Console to launch on any system with PHP-CLI and SQLite.
See the Codespaces README to get a fully functional cloud-based development environment.
- Clone the repo: github.com/department-of-veterans-affairs/va.gov-cms
$ git clone [email protected]:department-of-veterans-affairs/va.gov-cms.git $ cd va.gov-cms
-
Make sure your local repo is aware of what's on the remotes.
$ git fetch --all
-
Make sure git is not tracking perms
$ git config core.fileMode false $ git config --global core.fileMode false
-
Make sure rebase is your default
$ git config --global branch.autosetuprebase always $ git config --global branch.main.rebase true
-
Make changes to simplesaml storage not be tracked locally.
git update-index --skip-worktree samlsessiondb.sq3
You should periodically update your branch from origin main
branch. This will rebase your current branch on top of new commits in main:
$ git pull origin main
- Set ddev environment variables:
$ cd va.gov-cms
$ cp .env.example .env
- Install ddev
- Change into the project directory and run
ddev start
:
$ ddev start
The ddev start
command will include the composer install
command. Ensure that a CMS account is created and Step 3 is run to sync login information before logging into the local CMS environment.
See Environments: Local for more information on ddev.
You need a copy of the production database to get the full VA.gov CMS running.
Use the provided ddev commands to download a database and files backup into the correct locations in your local development environment.
ddev pull va
orddev pull va --skip-files
NOTE: This command downloads and imports the db followed by any configuration import.
If you are not using ddev, the scripts will
fail, but the files will still be available. The sync-db.sh
script downloads the
SQL file to ./.dumps/cms-prod-db-sanitized-latest.sql
See Environments: Local for more information on ddev.