From d523597515bcac320171e8e7092e9b960ffb8345 Mon Sep 17 00:00:00 2001
From: Yassine Doghri <yassine@doghri.fr>
Date: Wed, 27 May 2020 20:01:20 +0200
Subject: [PATCH] docs(readme): include dependencies installation in
 prerequisites

add sessions folder in .gitignore
---
 .gitignore |  1 +
 README.md  | 63 ++++++++++++++++++++++++++++++++++++++++--------------
 2 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4569922ba5..d115118835 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
 
 mariadb
 phpmyadmin
+sessions
diff --git a/README.md b/README.md
index 7ddfd6654e..5c2e3a75db 100644
--- a/README.md
+++ b/README.md
@@ -51,8 +51,14 @@ database.default.password = castopod
 > _NB._ You can tweak your environment by setting more environment variables. See the `./src/env` for examples or the [CodeIgniter4 User Guide](https://codeigniter.com/user_guide/index.html) for more info.
 
 3. Add the repository you've cloned to docker desktop's `Settings` > `Resources` > `File Sharing`.
+4. Install castopod's php dependencies
+   - The project's dependencies aren't included in the repository, you have to download them using the composer service defined in `docker-compose.yml`
 
-### Start dev docker containers
+```bash
+docker-compose run --rm composer install --ignore-platform-reqs
+```
+
+### Start docker containers
 
 Go to project's root folder and run:
 
@@ -60,9 +66,15 @@ Go to project's root folder and run:
 # starts all services declared in docker-compose.yml file
 # -d option starts the containers in the background
 docker-compose up -d
+
+# See all running processes (you should see 3 processes running)
+docker ps
+
+# Alternatively, you can check all processes (you should see composer with an Exited status)
+docker ps -a
 ```
 
-> The command will boot 3 containers in the background:
+> The `docker-compose up -d` command will boot 3 containers in the background:
 >
 > - `castopod_app`: a php based container with codeigniter requirements installed
 > - `castopod_mariadb`: a [mariadb](https://mariadb.org/) server for persistent data
@@ -70,30 +82,49 @@ docker-compose up -d
 >
 > _NB._ `./mariadb`, `./phpmyadmin` folders will be mounted in the project's root directory to persist data and logs.
 
-### Install / update app dependencies using the `composer` service
+### Start hacking
 
-The project's dependencies aren't included in the repository, you have to download them using the composer service defined in `docker-compose.yml`
+You're all set! Start working your magic by updating the project's files! Help yourself to the [CodeIgniter4 User Guide](https://codeigniter.com/user_guide/index.html) for more insights.
 
-```bash
-docker-compose run --rm composer install --ignore-platform-reqs
-```
+To see your changes, go to:
+
+- [localhost:8080](http://localhost:8080/) for the castopod app
+- [localhost:8888](http://localhost:8888/) for the phpmyadmin interface:
 
-Similarly, you can update the project's dependencies using the same service:
+  - **Username**: podlibre
+  - **Password**: castopod
+
+---
+
+### Going Further during development
+
+#### Update app dependencies
+
+You can update the project's dependencies using the `composer` service:
 
 ```bash
 docker-compose run --rm composer update --ignore-platform-reqs
 ```
 
-> _NB._ Both commands look for the `composer.json` file to find castopod's php dependencies, all of which live in the `./src/vendor` folder. For more info, check out [Composer documentation](https://getcomposer.org/doc/).
+> _NB._ Composer commands look for the `composer.json` file to find castopod's php dependencies, all of which live in the `./src/vendor` folder. For more info, check out [Composer documentation](https://getcomposer.org/doc/).
 
-### Start hacking
+#### Useful docker / docker-compose commands
 
-You're all set! Start working your magic by updating the project's files! Help yourself to the [CodeIgniter4 User Guide](https://codeigniter.com/user_guide/index.html) for more insights.
+```bash
+# monitor the app container
+docker logs --tail 50 --follow --timestamps castopod_app
 
-To see your changes, go to:
+# monitor the mariadb container
+docker logs --tail 50 --follow --timestamps castopod_mariadb
 
-- [localhost:8080](http://localhost:8080/) for the castopod app
-- [localhost:8888](http://localhost:8888/) for the phpmyadmin interface:
+# monitor the phpmyadmin container
+docker logs --tail 50 --follow --timestamps castopod_phpmyadmin
 
-  - **Username**: podlibre
-  - **Password**: castopod
+# restart docker containers
+docker-compose restart
+
+# Destroy all containers, opposite of `up` command
+docker-compose down
+```
+
+Check [docker](https://docs.docker.com/engine/reference/commandline/docker/) and [docker-compose](https://docs.docker.com/compose/reference/) documentations for more insights.
-- 
GitLab