Grassroots Economic Organizing (GEO) Collective's main website. As a Drutopia project we hope others can learn from and emulate, this project is public. https://geo.coop
Find a file
2024-06-05 21:59:31 -04:00
.ddev Update DDEV .gitignore 2024-06-04 22:12:28 -04:00
.gitlab/issue_templates Switch default issue assignee to Micky 2021-05-25 17:26:46 -04:00
config/sync Apply config changes from database updates 2024-06-05 21:59:31 -04:00
drush Update live site URL 2021-08-18 22:25:48 -04:00
patches Remove the drutopia default content 2019-07-18 15:40:57 -05:00
scripts Bring in standard pull script from Drutopia build source 2021-11-22 16:14:05 -05:00
web Add Drupal 10 compatibility for geo custom module and theme 2024-02-21 11:42:19 -08:00
.gitignore Move to standard backup folder path 2022-02-06 15:06:27 -05:00
.gitlab-ci.yml Add call to hosting for deploy 2019-08-30 23:54:38 -04:00
7to8fieldmapping.md Document change made in migration plan 2019-08-01 22:59:30 -04:00
composer.json Add visitors module 2024-06-04 23:15:03 -04:00
composer.lock Update composer lock 2024-06-04 23:15:09 -04:00
ddev_drush_settings.php I think this is safe to commit across environments 2019-07-18 23:27:24 -04:00
DEPLOYMENT.md Don't do live in the copy-paste instructions 2021-08-12 17:53:35 -04:00
DEVELOPMENT.md Link to what started this train of thought 2019-08-14 23:53:37 -04:00
README.md Update deployment instructions and how to reach them 2021-08-12 17:51:44 -04:00

GEO.coop README

This project is based on Drutopia, which means it is compatible with existing and future Drutopia features. We will be diverging from Drutopia for special functionality, however.

See DEPLOYMENT.md for easy deploy instructions with Ahoy.

Temporary upgrade notes

There's an error in the update hooks about url alias table not found, but confirmed that all the entries in old_5ebc14_url_alias also exist in the new path_alias table, so whatever happened there, nothing is lost in the upgrade.

Getting started

One time:

git clone git@gitlab.com:agaric/sites/geo.git
cd geo

Install DDEV for the following steps to work.

Whenever you want a fresh start:

git pull
ddev start
ddev composer update
ddev . drush -y site:install minimal --existing-config

Note: If you receive a Permission denied (publickey). error it means you need to copy your key into the DDEV container by running ddev auth ssh.

Pull live content down for development

drush sql-sync @live @self
drush -y rsync --exclude-paths=css:js:php --verbose @live:%files/ @self:%files

Running the migration in development

Download the D7 files via the Backup and Migrate module.

Put the D7 files in the following location:

<Project Root>/d7/sites/default/files/

There is a reference to the sites/default/files in the database so that structure is mandatory for the migration.

The path in the upgrade_d7_file.yml migration file is different because this is executed inside the docker container so in the docker container the is: /var/www/html/ but no need to re-create those folders in the host machine.

Download a database dump of the D7 site via the Backup and Migrate module.

Create a database called drupal7:

Use ddev describe to see what the host and port are for your local environment, and use that in the first line here:

mysql --host=127.0.0.1 --port=32779 --user=root --password=root --database=db
CREATE DATABASE drupal7;
GRANT ALL ON drupal7.* to 'db'@'%' IDENTIFIED BY 'db';

Now ctrl+c out of there, and, again substituting the host and port for your own, import your file from whereever you placed and named your db SQL dump:

mysql --host=127.0.0.1 --port=32779 --user=root --password=root --database=drupal7 < data/db.mysql

(Above per instructions for creating another database in ddev.)

Once the files are in the correct place and the database has been created we can run the following to run all the migrations:

ddev . drush mim --group="migrate_drupal_7_geo"

Note: The migration will partially fail because of missing files. For now, re-run the migration command and it will complete the migration.

Running the migration on the hosted instance

  1. Refresh files and database from live.
    • Obtain the latest from the prior site via Migrate and Backup: database, and public files, as two separate downloads. The following commands assume the files saved as files.tar.gz and database.sql.gz
    • Upload these to the server: scp *.gz geo_live@drutopia.org:
    • SSH to server: ssh geo_live@drutopia.org
    • Unzip the uploaded database file: gunzip database.sql.gz
    • Drop the existing tables: drop-tables.sh geo_legacy
    • Reload the uploaded database: mysql geo_legacy < database.sql
    • Change to the files folder and untar them: cd site/d7/sites/default/files/ and then: tar xzf ~/files.tar.gz (this will take a couple minutes).
    • The server side is ready! Log off by typing ctrl+d
  2. Now perform a deployment with drutopia_hosting. This will install the site using the minimal profile and existing config. Set the vars accordingly (drupal_install and drupal_forceinstall must be True), if needed: ahoy vault-edit
    • Deploy a new build, as needed: ahoy deploy-build news
    • Deploy the site. With a forced re-install, a migration will be performed automatically: ahoy deploy-site geo_live

Post go-live tasks

  1. Remove all d7 files: rm -rf site/d7 and rm geo_legacy.sql, etc.
  2. Change the site settings in hosting:
    • config_import -> True
    • php_settings_code -> blank
  3. Change the news build settings in hosting:
    • remove custom build commands (i.e. sed)
  4. At this point, the deploy should be typical (deploy-build/deploy-site as normal)