From 9ab84c5174f1b8c0254b71e267da7ca1afce7bbe Mon Sep 17 00:00:00 2001 From: Kai Neuwerth Date: Wed, 25 Apr 2018 08:30:33 +0200 Subject: [PATCH 1/2] Add COMPOSE_PROJECT_NAME to env-example --- env-example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/env-example b/env-example index 87f4cefe..b2aabba0 100644 --- a/env-example +++ b/env-example @@ -29,6 +29,9 @@ COMPOSE_FILE=docker-compose.yml # Change the separator from : to ; on Windows COMPOSE_PATH_SEPARATOR=: +# Define the prefix of container names. This is useful if you have multiple projects that use laradock to have seperate containers per project. +COMPOSE_PROJECT_NAME=laradock + ### PHP Version ########################################### # Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6 - 5.5 From ad1509dd62d40694795fd17e76273e5824b63d3f Mon Sep 17 00:00:00 2001 From: Kai Neuwerth Date: Wed, 25 Apr 2018 08:38:43 +0200 Subject: [PATCH 2/2] Update docuumentation for COMPOSE_PROJECT_NAME --- DOCUMENTATION/content/getting-started/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DOCUMENTATION/content/getting-started/index.md b/DOCUMENTATION/content/getting-started/index.md index 2e7ea123..6613ad35 100644 --- a/DOCUMENTATION/content/getting-started/index.md +++ b/DOCUMENTATION/content/getting-started/index.md @@ -165,6 +165,8 @@ You can edit the `.env` file to choose which software's you want to be installed Depending on the host's operating system you may need to change the value given to `COMPOSE_FILE`. When you are running Laradock on Mac OS the correct file separator to use is `:`. When running Laradock from a Windows environment multiple files must be separated with `;`. +By default the containers that will be created have the current directory name as suffix (e.g. `laradock_workspace_1`). This can cause mixture of data inside the container volumes if you use laradock in multiple project. In this case, either read the guide for [multiple projects](#B) or change the variable `COMPOSE_PROJECT_NAME` to something unique like your project name. + 2 - Build the enviroment and run it using `docker-compose` In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts: