From 003baa45ec17cea7e91143e3cbb2abe79a4d10fa Mon Sep 17 00:00:00 2001 From: Stan Yakubenko Date: Fri, 5 Feb 2021 21:56:38 +0500 Subject: [PATCH] Add: instructions to the README file --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index dfae8dd..9ea455e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,54 @@ # DOCKER ZOO Get your local PHP development environment set up in minutes. + +## Installation + +To use this stuff you have to be familiar with git submodules as this repo is supposed to be used as a git submodule. + +Run these commands in your project's dir. + +``` +git submodule add https://gitlab.com/sn_yakubenko/docker_zoo.git +git submodule init +git submodule update +``` + +## What's next + +This is where the party starts. Do the following. + +``` +cd docker_zoo +cp .env.dist .env +cp docker-compose.dist.yml docker-compose.yml +cd .. +cp ./docker_zoo/Makefile.example Makefile +``` + +Then you have to edit you `.gitignore`. Add you newly created `Makefile` into it. So you won't have your experiments in your repo. + +Open your `Makefile` in your favourite editor and change the paths for the following as shown below. + +```Makefile +DOCKER_COMPOSE_FILE:=docker_zoo/docker-compose.yml +ENV_FILE:=docker_zoo/.env +``` + +By doing this you'll make your Makefile use those config files. + +## How to use what I've just done + +`run services` - run this in your project's dir `sudo make start c=service1 service2 ...` + +`stop services` - run this in your project's dir `sudo make down` + +`run a command` - run this in your project's dir `sudo make cmd c=service command` - this command will be run in your working dir + +## I've done all that. What's next + +Open `http://localhost:8080` on your host machine and you shoud see your project's homepage + +## I've done all that and can't get my app running + +So, browse the Makefile and you'll find that `log` and `status` things. Feel free to Google errors. Only if nothing else helps, contact me `sn.yakubenko@gmail.com`