Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Pronovix/composer-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker based Drupal site with Wodby containers

Requirements

  • git
  • docker

How to use

First time setup

  1. git clone [email protected]:Pronovix/composer-tutorial.git
  2. cd composer-tutorial
  3. cp .env.example .env (modify .env file contents to your needs)
  4. cp web/sites/default/example.settings.local.php web/sites/default/settings.local.php (modify settings.local.php file contents to your needs)
  5. docker-compose up -d
  6. docker-compose exec php composer install
  7. docker-compose exec php drush si config_installer -y
  8. docker-compose ps webserver (take note of the port number, e.g. 32782 if the result was 0.0.0.0:32782->80/tcp)
  9. Visit localhost:1234/ in your browser and change 1234 to the number you saw after 0.0.0.0:, e.g. localhost:32782/
  10. Enjoy

Every day usage

  1. Navigate to your project's folder in terminal
  2. Make sure containers are up, run docker-compose up -d
  3. docker-compose ps webserver (take note of the port number, e.g. 32782 if the result was 0.0.0.0:32782->80/tcp)
  4. Visit localhost:1234/ in your browser and change 1234 to the number you saw after 0.0.0.0:, e.g. localhost:32782/

Running drush commands

Outside the php container

  1. Navigate to your project's folder in terminal
  2. (optional) Make sure containers are up, run docker-compose up -d
  3. docker-compose exec php drush DRUSHCOMMAND, e.g. docker-compose exec php drush cr

Inside the php container

  1. Navigate to your project's folder in terminal
  2. (optional) Make sure containers are up, run docker-compose up -d
  3. docker-compose exec php bash
  4. drush DRUSHCOMMAND, e.g. drush cr

Running composer commands

Inside the php container

  1. Navigate to your project's folder in terminal
  2. (optional) Make sure containers are up
  3. docker-compose exec php composer COMPOSERCOMMAND, e.g. docker-compose exec php composer install

Outside the php container

  1. Navigate to your project's folder in terminal
  2. (optional) Make sure containers are up
  3. docker-compose exec php bash
  4. composer COMPOSERCOMMAND, e.g. composer install

Notes

  • If the containers are restarted (e.g. after reboot or after docker-compose restart), the webserver port will change, make sure you have the right one with docker-compose ps webserver

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages