A guide on getting DDEV up and running on your local machine.
DDEV Installation guide
Prerequisites
To run this project you will need to run the backend using ddev & docker. You can read more about installing those applications on your laptop here:
If you have these applications installed, you can run the project by going over the following steps:
Steps
- Clone the repository to your local folder.
- Cd to the project backend folder.
cd ~Web/nfp/nfp-backend
- Get docker running.
- Kill all currently active docker containers. (optional)
docker kill $(docker ps -q)
- Copy the .env.example.dev file.
cp .env.example.dev .env
- In that env file, update these two variables with the ones in Servd.
SERVD_PROJECT_SLUG= SERVD_SECURITY_KEY= - Get the Craft security key from Project settings > Craft Config in Servd
CRAFT_SECURITY_KEY= - Start ddev.
ddev start
- Pull the assets.
ddev craft servd-asset-storage/local/pull-assets
- Pull the database.
ddev craft servd-asset-storage/local/pull-database
- Install backend packages.
ddev composer install
- Your backend should now be running at http://nfp.ddev.site/admin.
Useful commands
# start DDEV environment for NFP
ddev start nfp
# check details for DDEV installation
ddev describe
# Syncs a remote env on the Servd Asset Platform with the 'local' env.
ddev craft servd-asset-storage/local/pull-assets
# Pulls a database dump from a remote Servd environment into the local database.
ddev craft servd-asset-storage/local/pull-database
# Syncs the 'local' env's assets with another env.
ddev craft servd-asset-storage/local/push-assets
# Pushes a local database dump to a remote Servd environment.
ddev craft servd-asset-storage/local/push-database