This is an attempt to include Drupal 8 & Reactjs (Node based Frontend) together within a docker. You can use it to learn or develop headless Drupal applications.
- Traefik - prabhakarhub_traefik
- Mailhog - prabhakarhub_mailhog
- Portainer - prabhakarhub_portainer
- PHP - prabhakarhub_php
- PMA - prabhakarhub_pma
- Mariadb - prabhakarhub_mariadb
- Node - prabhakarhub_node
To ssh into containers run command docker exec -it <container_name> bash
- Make sure you are inside
drupal8_with_reactjs(prahubis updated more frequently) or directory containingdocker-compose.yml - Make copy of .env.example & rename to .env
- Run
docker-compose up -d - SSH into PHP container (
docker exec -it prabhakarhub_php bashin this case) and runcomposer install - SSH into PHP container and run
drush cim -y - Exit from PHP container.
- Drupal 8 - http://prahub.docker.localhost:8888
- Reactjs - http://app.prahub.docker.localhost:8888
You can change port number, container names, paths etc by editing .env file.
- Consolidate multiple setup commands to single command
- Preservation of container data even after removal
- Pass environment variables from .env to reactjs
- Better documentation
Any help or suggestion are always welcome.