This repository holds the codebase for the homepage of the SWISS Amateur Radio Teletype Group.
This repository is the source of truth. Changes made in this repository will be pushed the hosting. Consequently, changes made directly on the hosting will be reverted.
Using DDEV, a local development environment provides a save space to do code changes before they are being pushed to the hosting.
The Drupal Configuration Management is used to export site configuration to config files tracked within this repository. Changes to the site must be done in the local development environment first and then pushed to the hosting through code changes.
- A working installation of DDEV. See its documentation on how to get started on your platform.
- A git client. Checkout the git download page on how to get it for your platform.
- Read-only access to the database on the hosting.
- FTP access to the hosting.
-
Clone the source code
git clone git@github.com:swiss-artg/homepage.git swiss-artg
The folder
swiss-artg
will be referred to as repository root. -
Configure the database access
Create the file
.ddev/.env
using the text editor of your choice with the following content.REMOTE_HOST=<host> REMOTE_DB=<db> REMOTE_DB_USER=<db_user> REMOTE_DB_PASSWORD=<db_password> REMOTE_FTP_USER=<ftp_user> REMOTE_FTP_PASSWORD=<ftp_password> REMOTE_FTP_PORT=<ftp_port>
Replace all instances of
<…>
with the values you received from a site administrator.Protect the file from prying eyes.
chmod 600 .ddev/.env
-
Start the DDEV environment
Execute this from within the repository root.
ddev start
-
Fetch content from the hosting
ddev fetch-db ddev fetch-files
-
Reset local environment
ddev reset
Doing a full reset all the time, can be a bit over the top and time consuming.
Check out the contents of .ddev/commands/host/reset
to set what that command is doing.
Run indivudall commands as you seem fit in your development workflow.
-
Access the site
ddev launch
Use user
admin
with passwordadmin
to login as site administrator.