-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up on your local machine
Make sure you have read and understand the General Drupal siteβbuilding philosophy before actually doing any development work.
This is a Drupal 10 site. As such, your environment should be set up in a way that can run a Drupal site. The basic system requirements for a Drupal site are:
-
Web server
- Apache 2.4.7 or higher, Nginx 1.1 or higher, or any other web server with proper PHP support.
- More details about web server requirements.
-
Database (any one of the following options)
- MySQL 5.7.8 (or greater)
- MariaDB 10.3.7 (or greater)
- Percona Server 5.7.8 (or greater)
- PostgreSQL 10 (or greater)
- SQLite 3.26 (or greater)
- More details about database requirements.
-
Memory
- Memory requirements RAM: Minimum required memory is 1GB to make sure Composer works. If you are running multiple modules or using memory-intensive tools such as Solr, or Memcache, considerably more memory may be needed.
- PHP memory requirements: The minimum required memory size is 64 MB, typically 128 MB or 256 MB are found in production systems. For more, see PHP memory requirements. Be aware of the limitations of 32-bit PHP.
-
PHP
- PHP version: Drupal 10 requires at least PHP 8.1. PHP 8.1.6 is recommended.
- PHP extensions needed: PDO, XML, GD-library, OpenSSL, JSON, cURL, Mbstring.
- More details about PHP requirements.
-
Disk space
- Minimum 100MB. You will need more space if you install additional modules or themes, and youβll also need space for media, backups, and other files generated by and uploaded to your site
If you are running macOS, you could try following the setup suggestions here: https://getgrav.org/blog/macos-sonoma-apache-multiple-php-versions. But as long as you can get a PHP site running on your local machine, that's all good and well.
Note: you will also need a copy of the latest database dump and the latest files folder. Until we set up some jobs that can do this automatically, we'll have to SSH into the production server to get this.
-
Clone repository
git clone [email protected]:interledger/interledger.org-v4.git
-
Create
sites
folder and addsettings.php
andsettings.local.php
to thedefault
folder inside. βββ web/ βββ sites/ βββ default/ βββ settings.php βββ settings.local.php
-
Set up the database configuration in the
settings.php
file$databases['default']['default'] = array ( 'database' => 'DB_NAME', 'username' => 'DB_USER_NAME', 'password' => 'DB_PASSWORD', 'prefix' => '', 'host' => 'localhost', 'port' => '3306', 'isolation_level' => 'READ COMMITTED', 'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql', 'driver' => 'mysql', 'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/', );
-
Set up the config sync directory in the
settings.php
file (because we are dumping the contents of thefiles
folder directly into thedefault
folder)$settings['config_sync_directory'] = 'sites/default/files/config_4mhP4mzowBJ4Vu-Zgz4VRJeNAgvRZn7Gh2GBm_79fFn2zyqzRcphZh9XPG5_vdwLwTwfkrpzKA/sync';
-
Extract the files backup into the
default
folder. βββ web/ βββ sites/ βββ default/ βββ files βββ settings.php βββ settings.local.php
-
Create new MYSQL database which matches the database name in the configuration and import database backup
./vendor/bin/drush sql-cli < DB_BACKUP.sql
-
Check the Status Report page for any errors (
admin/reports/status
)- You will need to create a
private
folder at the same level as theweb
folder and adjust permissions accordingly
- You will need to create a
First of all, make sure you know what you're doing before proceeding. This is the production server and you could bring the website down if you mess things up.
- SSH into the AWS EC2 instance. You can find the instructions for this after logging into your AWS account. Go to EC2, then Instances, then the website instance, then Connect (in the top-right corner). The command and guidance is under the SSH client tab.
ssh -i "PATH_TO_PEM_FILE" ec2-user@EC2_INSTANCE_PUBLIC_DNS
- To dump the production database, navigate to the document root (if you don't know where that is, ask in the tech-team channel, if you don't have access, you probably shouldn't be accessing the production server to begin with δΉβ (β β β’β _β β’β β )β γ)
./vendor/bin/drush sql-dump > backupdb.sql
scp -i "PATH_TO_PEM_FILE" ec2-user@EC2_INSTANCE_PUBLIC_DNS:/PATH_TO_SQL_FILE /LOCAL_MACHINE_PATH
- To get the asset files, zip up the files folder and download it to your local machine
zip -r files.zip /PATH_TO_FILES_FOLDER
scp -i "PATH_TO_PEM_FILE" ec2-user@EC2_INSTANCE_PUBLIC_DNS:/PATH_TO_FILES_ARCHIVE /LOCAL_MACHINE_PATH
- Please remember to remove the backup database and backup files folder from the EC2 instance once you've downloaded the files to your local machine.
- Home
- Recurring tasks
- Local site development
- State of interledger.org
- One-time setup notes