A Drupal Starterkit with GraphQL, GraphQL Twig, Gin Future UI, Minimal Frontend Setup with Webpack and vanilla JS running on Docksal (Docker).
Install Docker Desktop (Mac/Windows): https://www.docker.com/products/docker-desktop (Use Version 2.1.0.5 or lower until this issue is fixed: docksal/docksal#482)
Install Docksal: https://docksal.io/
Clone the repo into ~/Projects
git clone [email protected]:AdictoGmbH/drupal-docksal-starterkit.git drupal-docksal-starterkit
fin init
Replace /sites/development.services.yml
in drupal/web/sites/default/settings.local.php
with /sites/local.services.yml
.
cd drupal
composer install
cd web
composer install
drush site-install standard --site-name=drupal-docksal-starterkit --account-name=admin --account-pass=drupal
cd drupal/web
mkdir -p sites/default/files/icons/svgs
cd themes/frontend
cp images/icons/menu.svg ../../sites/default/files/icons/svgs/
Needs to happen after copying the icon
drush sql-cli < ../db_dump/drupal.sql
drush generate-sprites
drush cr
echo "options:
uri: 'http://drupal-docksal-starterkit.docksal/'" >> drupal/drush/drush.yml
fin start [or fin up]
fin stop
fin system start
fin system stop
fin bash
fin exec --in=CONTAINERNAME bash
Make sure you're in the frontend folder (cd drupal/web
)
fin drush COMAMND
fin drush sa
fin drush sql-sync @dev @self
Syncs the DB, Syntax: @FROM-ALIAS @TO-ALIAS
fin drush rsync @dev:%files @self:%files
Syncs files, Syntax: @FROM-ALIAS @TO-ALIAS, %files is a wildcard for the specificed Drupal files folder
fin drush @dev ssh
SSH into the remote server
Make sure you're in the frontend folder (cd drupal/web
)
fin composer COMMAND
https://drupal-docksal-starterkit.docksal/
username: admin
password: drupal
https://drupal-docksal-starterkit.docksal/graphql
Authentication via Bearer access token.
curl --request POST \
--url https://drupal-docksal-starterkit.docksal/oauth/token \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type=password \
--data username=api \
--data password=drupal \
--data client_id=104a2b89-02fc-4501-aebc-2ec7766cc84f \
--data 'client_secret=7U9_kQ_@ozhHi!.v-!'
https://mail.drupal-docksal-starterkit.docksal/
https://solr.drupal-docksal-starterkit.docksal/
Install
cd drupal/web/themes/frontend/
nvm use
npm install
Install dependencies in drupal/web/core
(used for linting, e.g.)
cd drupal/web/core/
nvm use 10.15.1 # no version specified, let's use the one from `drupal/web/themes/frontend/`
npm install
See drupal/web/themes/frontend/README.md
By default, the frontend is built in a pre-commit
hook and drupal/web/themes/frontend/dist
added to the commit. Use --no-verify
in your git commit
command to skip this behavior.
cd drupal/web
fin bash
drush sql-cli < PATH_TO_DUMP
drush cr
drush cim -y
drush updb
To deploy changes use
bash drupal/web/deploy.sh
Replace /home/YOURSERVER with the home path on your server
It includes the following steps:
- db dump
- git pull
- composer install
- drush cim -y
- drush updb
- drush cr
It checks environment. Server environments will be recognised based on the path prefix /home/YOURSERVER.