Skip to main content

The Anatomy of a GovCMS Repository

Submitted by Toby Wild on

The GovCMS repository is full of files, some you can edit, some that are locked... there is a custom folder, can I put custom modules there?

This article is here to make that all clear!

I have specified some locked files below, that is only relevant to GovCMS SaaS sites. PaaS users have a fully unlocked git repo and can basically do what they want.

(Bold means folder)

  • .docker
  • config
  • custom
  • drush
  • files
  • scripts
  • tests
  • themes
  • .ahoy.yml
  • .dockerignore
  • .editorconfig
  • .env
  • .env.default
  • .gitattributres
  • .gitignore
  • .gitlab-ci.yml
  • .lagoon.env
  • .lagoon.env.master
  • .lagoon.yml
  • .version.yml
  • behat.yml
  • docker-compose.yml
  • favicon.ico
  • README.md
  • redirects-map.conf

 

.docker

All the files in this folder are locked, and are all related to the Scaffold.

config

This folder contains your exported Configuration YML files. This is only used if your site has Configuration Management enabled.

custom

Despite the name, this is not your where you put your custom modules... this is where you can create custom ahoy commands.

drush

You can define custom local drush commands in here.

files

This is basically the /sites/default/files directory that you might be used to normally. When you upload a media asset in your site it will end up here.

scripts

Actually not fully sure what this is used for.

tests

I know there are some test bed options coming in using Behat, but there hasn't been any solid comms about it at this point.

themes

Should be obvious, this is where the Themes go. The only unique thing to remember about this, is that when this is deployed on platform, this folder is actually mapped to the /web/themes/custom folder.  So if you create a subfolder called Custom, and put your theme in that, the ACTUAL on platform file location for the theme will be /themes/custom/custom/my_theme name. Only really a problem if you are hard coding links to files in your theme.

.ahoy.yml

This file is locked.  It contains the shortcut commands that you use to control the website locally. This includes things like stopping and starting the containers, refreshing the database, as well as others. You should read this file, or run "ahoy" to get an overview of the available commands.

.dockerignore

What files Docker should ignore when building images. You will never need to edit this.

.editorconfig

More config you will never need to touch.

.env

This contains the basic infrastructure for the local environment. These values either aren't used on platform, or are overridden. The real only values of note are DEV_MODE, which turns Twig template suggestions on as well as enables XDebug.

.env.default

This file is locked. It is the standard .env file contained in every project.

.gitattributres

Drupal Git noramlisation standards.

.gitignore

Your standard .gitignore, be sure to include whatever files your IDE of choice generates.

.gitlab-ci.yml

This file is locked.

.lagoon.env

This file is locked.

.lagoon.env.master

This allows you to create lagoon environment overrides for specific environments.

.lagoon.yml

This file is locked. This file contains important information about how the site runs on the Lagoon platform, including the Cron tasks and domains. You will never need to update these files yourself.

.version.yml

This file is locked. It proves basic platform information on what version of the site you are using.  GovCMS might update this file when new scaffold updates are released.

behat.yml

Settings for Behat testing. I don't think there is any official word in GovCMS land about how this works yet though.

docker-compose.yml

This file is locked.

favicon.ico

Your sites Favicon, if not defined in your theme.

README.md

This is the standard README.md which contains useful information like how to run ahoy init. It is basically useless once you spin up your site, so feel free to rewrite it as much as you like.

redirects-map.conf

Provides you the ability to create pattern based redirects, including sending people to a differnet host address (In case a section of your website gets MOG'd out).