Agaric web development cooperative's main web site: https://agaric.coop
Find a file
2024-11-06 13:36:53 -05:00
.ddev Apply DDEV self-updates 2023-12-15 18:15:50 -05:00
.gitlab/issue_templates Fix formatting in User Story template 2019-01-25 12:18:46 -07:00
.vscode Add launch.json for debugging from VScode 2023-10-24 19:46:27 -04:00
box Create single method to provide all overridden values 2018-08-23 22:56:43 -04:00
config Apply config changes from database updates 2024-02-15 21:42:27 -05:00
drush Remove incorrect local drush information 2022-03-03 21:27:18 -05:00
provisioning Add rake tasks, provisioning, and templates 2019-02-20 15:55:38 -05:00
rakelib Add rake tasks, provisioning, and templates 2019-02-20 15:55:38 -05:00
scripts Add file sync to pull command 2023-01-26 17:54:11 -05:00
web Add services.yml to set session cookie length * 10 2024-11-06 13:36:53 -05:00
.gitignore Update name of ignored backup directory 2021-07-14 08:01:39 -04:00
.gitmodules Update submodule location 2024-02-16 17:51:24 -05:00
agaric-coop.code-workspace Add VScode workspace opener 2023-10-20 17:48:00 -04:00
composer.json Allow Drush to always float to latest supported version for corresponding Drupal 2024-02-15 21:23:38 -05:00
composer.lock Update composer lock 2024-02-15 21:40:47 -05:00
Makefile Merge branch 'master' into 'add-rake-tasks' 2019-02-20 21:05:56 +00:00
phpunit.xml Add the proper configuration to run the tests 2018-08-24 15:46:37 -04:00
Rakefile Add rake tasks, provisioning, and templates 2019-02-20 15:55:38 -05:00
README.md Update README with Ahoy approach 2022-09-12 16:56:02 -04:00
redirects.txt Add redirects.txt as expected per drutopia_host 2018-12-07 02:00:24 -05:00
SERVICES.md record our server and who it's named after 2019-03-10 10:03:51 -04:00
Vagrantfile Add all files needed to bring up VM and run agaric.com locally 2018-08-20 10:45:20 -04:00

Agaric's Flagship Site

See also SERVICES.md

Get submodules

This project includes the Agaric styleguide as a git submodule.

When cloning

git clone --recurse-submodules git@gitlab.com:agaric/sites/agaric-com.git

If you cloned without --recurse-submodules

If in your initial clone you didn't do as above, you can get the styleguide with:

git submodule init
git submodule update

Get started

To be able to import the configuration, you need to get the initializing database (where we will also be collaborating on content) from the test site pending resolution of drutopia#216.

ddev start
ddev auth ssh
ddev composer install
ddev . drush -y sql-dump > /tmp/paranoia.sql && drush sql-drop && drush -y sql-sync @live @self && drush -y updb
ddev . drush -y rsync @live:%files @self:%files

Get updates

git pull
git submodule update --recursive --remote
ddev start
ddev composer install
ddev . drush -y sql-dump > /tmp/paranoia.sql && drush -y sql-drop && drush -y sql-sync @live @self && drush -y updb
ddev . drush -y rsync @live:%files @self:%files
ddev . drush cim -y

Theming

See web/themes/custom/agarica/patternlibrary/README.md for how to make changes, especially involving Sass to CSS compilation for styles.

After making changes withing the Pattern Library within the custom Agaric theme, commit these changes first to the pattern library itself, and second commit the pattern library as a whole to the main project (it will be a single change, "Subproject commit" and the current hash value of the subproject repository.

Deployment

Agaric is currently using a Platform as a Service version of Drutopia with additional modules.

Set up drutopia_host and hosting_private, as documented in hosting private.

Then use ahoy, from within the hosting_private directory (cd ~/Projects/drutopia-platform/drutopia_host/hosting_private).

Ensure all three related repositories are up-to-date with:

cd ~/Projects/drutopia-platform/drutopia_host/hosting_private
ahoy git-pull-all

If Agaric's Drutopia PaaS base has changed (the composer.lock in this directory), produce and push a new build:

ahoy deploy-build agaric

To deploy this build to an instance of the site plus config, templates, styles:

ahoy deploy-site agaric_test

(And likewise for agaric_live.) Use deploy-site-force in place of deploy-site if you need to override configuration changes made on live and you are certain you have captured all wanted changes.

Then record the deployment, logs from both deploy-site and deploy-build:

ahoy artifacts

Drupal settings file management

The Drupal settings files are also managed by Drutopia. On each deploy, the file is generated and replaces the settings.local.php that is on the server with whatever settings will match the Drutopia configuration. Therefore, in order to add settings, you must edit the vault settings using:

ahoy vault-edit

Look for the Yaml section for agaric_live, or agaric_test, as appropriate, and edit the php_settings_code section to add items to that site's setting overrides. For example:

      ...
      online: True
      php_settings_code: |2
        $settings['super_secret'] = p@ssw0rd;
        $config['life.answer'] = 42;
      server_aliases:
        - agaric.com
      ...

Code Hightlight.

The prism.js library was added in the site and can be used like this:

<pre>
  <code class="language-css">
    p { color: red }
  </code>
</pre>

The suffix of the class needs to be changed depending of the language that is going to be highlighted eg: language-php, language-js etc.