Backend Development - DoSomethingArchive/legacy-website GitHub Wiki
ds script
The ds script will build your local environment using the DoSomething installation profile.
ds --help
will list out all of the various options for the script including:
-
Running the build with a clean database
-
Running the build and using your existing database
The ds script creates a html
directory in the working folder, which serves as the root directory of your localhost:8888. It contains the Drupal codebase which is downloaded from drupal.org when the make files are run, including the contrib modules defined in the drupal-org.make file.
Contributed and custom modules, themes, and libraries will be found in the html/profiles/dosomething directory. The "html/profiles/dosomething/modules/dosomething" directory is a symlink to the root directory "modules/dosomething", as is the corresponding themes directory (See #51)
Note: If you're editing files in dosomething-mount/lib
but the browser doesn't reflect your changes, you may have run ds
from the /vagrant/bin
directory (muy incorrecto). To fix this, simply log in into your vagrant box and repeat "Application Setup" step 2 again.
Note: Do not use sudo
when running the ds
script as ownership and access settings are important to the script which should be setup as part of the script process. Doing a fresh ds build --install
will reset all of the ownership / access settings.
Drush
To run drush commands, you must be within the Vagrant instance, and in the webroot:
cd /var/www/dev.dosomething.org/html
MySQL
To run MySQL, you must do so as root:
mysql -uroot
USE dosomething;
SHOW TABLES;
If you're feeling drush-y:
cd /var/www/dev.dosomething.org/html
drush sql-cli
Additionally, you can connect with sql pro / Sequel Pro or other sql tools with credentials:
- MySQL Host: dev.dosomething.org
- Username: root
- Password: (none)
- Database: dosomething
- Port: 3306
- SSH Host: dev.dosomething.org
- SSH User: dosomething
- SSH Password: dosomething
- SSH Port: 2222