Skip to content
Snippets Groups Projects
README.md 3.5 KiB
Newer Older
jurgenhaas's avatar
jurgenhaas committed
# LakeDropsDrupalDev - L3D
jurgenhaas's avatar
jurgenhaas committed

Provides fully configured Docker images for local Drupal development where your local host requires nothing else than Docker being installed but no PHP, Composer or any other tool on this planet. It simply works.
jurgenhaas's avatar
jurgenhaas committed

## Prerequisites
Nothing else than docker being installed on your host. You don't need any other tool - none!
You can install the tool with the following command:
docker run -v /usr/local/bin:/setup --rm registry.lakedrops.com/docker/l3d/setup:latest
This will install the script `l3d` into the given directory `/usr/local/bin` from where it is executable everywhere on your host (assuming this path being in your search path). If you want that script to be installed elsewhere then provide that alternative path in the install command above. Also, instead of `latest` you can also start with any othe specific version number of this tool. You can find all available version string in the [tag list](https://gitlab.lakedrops.com/docker/l3d/tags) of this project.
jurgenhaas's avatar
jurgenhaas committed

jurgenhaas's avatar
jurgenhaas committed
NOTE: depending on your system setup it may well be impossible for Docker to mount the example directory `/usr/local/bin` from above. We've seen this happening especially on MacOS. In such cases, please use a different directory and make sure that it's part of the PATH environment variable so that it remains convenient to execute that script from everywhere.

jurgenhaas's avatar
jurgenhaas committed

richardpapp's avatar
richardpapp committed
Go to the project root for which you want to use **L3D** and execute the installed script: simply type `l3d` at the command prompt.

It will ask you for the PHP version (input `7.0`, `7.1` or `7.2`), the project name and template to be used. Then it will download the matching **L3D** image and start a container for you.
Inside the container you'll find the directory `/drupal` which contains everything from your project's root. You can work from there by using these available tools:
jurgenhaas's avatar
jurgenhaas committed

| Tool | Command | Shortcut |
| --- | --- | --- |
| Ahoy | `ahoy` | `a` |
| Composer | `composer` | `c` |
| Docker | `docker` | |
| Docker Composer | `docker-compose` | `d-c` |
| DorgFlow | `dorgflow` | |
| Drush | `drush` | `d` |
jurgenhaas's avatar
jurgenhaas committed

richardpapp's avatar
richardpapp committed
### LakeDrops Drupal 8 project template

If you have chosen the LakeDrops Drupal 8 project template, type 'a d4d up' at the command prompt within the container to start the remaining containers.

'drush status' will then show you the URL of your project.

## Update the start script

jurgenhaas's avatar
jurgenhaas committed
Just call `l3d selfupdate` and the start script will be updated from the original repository. This will also update all your existing **L3D** images and remove the outdated containers so that they will be recreated the next timne you're going to use them.
## Working with Git credentials

In order to commit and push with git you have to at least configure your email address and username for the git client. If you configure those globally on your host, each of the **L3D** containers will inherit those settings and there is nothing that needs to be done inside the container.

To configure those credentials, use these commands:

```bash
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
```

## Getting help

Calling `l3d help` displays information about **L3D** and provides a link to further details.

## Examples

### Start a new project

```bash
cd /var/www
mkdir testproject1
cd testproject1
l3d
```

jurgenhaas's avatar
jurgenhaas committed
You will be presented with a list of options on how to get started and you can simply follow the instructions on screen.

### Use with an existing project

```bash
cd /path/to/your/project
l3d
composer update
```