How to get a Project locally
There are 2 ways to get a Project running onto your machine, depending on your preference and technical expertise:
- using one of Dropsolid's recommended solutions
- using your own dev stack
Prerequisites¶
SSH key¶
Before you can get projects installed locally, you will need to make sure you have set up an SSH key. For information on how to do so, see the Manage SSH keys page.
Using Launchpad¶
Notice
We are in the process of switching to another tool for local development, the documentation will be updated to reflect this, when it is ready to be used with the Platform.
At Dropsolid, we use Launchpad to run a virtual image (uses Docker) on our local machines, which in turn runs our Projects.
Find more information in the support docs and on the Launchpad documentation site
The important thing to get the project, is to know the machine name, which can be found on the ‘Technical’ tab of your Project.
Using your local stack¶
We’re not going to tell you how to set up your own stack (since there are many options), but it is doable to get the Project repository and database so you can run a Project in the solution of your choice. If you are not using Launchpad, we recommend DDEV.
1. Repo¶
You can find the repository location in the ‘General’ tab of your Project or even Project Environment.
2. Technical info¶
Relevant information, such as the PHP or Node JS version this Project Environment is running (which you want to mirror in your local setup), can be found in the ‘Technical’ tab.
3. Dependencies¶
Our Drupal (and Mautics) are composer-based, so it’s important to run the appropriate commands according to the readme files included in those projects, or specific information provided in that Project’s Space in Confluence. The Rocketship projects, for example, have an extensive installation & development guide.
For javascript-based projects, dependency management will depend on the type of framework used. Again, refer to the included readme file(s) for more information but they will usually contain at least a package.json file referencing node modules. At the very least there will be a version of Node JS and NPM required, and an npm install
you’ll have to run.
4. Database¶
In case you need to downsync an existing database, or keep the local & a remote on in sync.
Drupal
In the case of a Drupal project, the easiest way to be able to sync your local and a remote databases, or simply downsync, would be to use drush and drush aliases. Your project already contains the right files in etc/drush
.
We won’t go over how to work with aliases, but it should just be a matter of either pointing your local setup to the file location or move the files to the expected place (eg. in DDEV, it needs to be in drush/sites/
)
The ‘Common commands’ item of the ‘Technical Info’ tab contains some example commands for database & file syncing, it looks something like this: ddev drush sql:sync @<my project>.staging @self
Alternatively, you have SSH access to the non-production environment servers, so you could feasibly connect and get to the database that way. The SSH command is also in the ‘General’ tab of the Environment. You can find database information for the remote environments, in settings files located in etc/drupal