Skip to content
Snippets Groups Projects
Commit d5235975 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

docs(readme): include dependencies installation in prerequisites

add sessions folder in .gitignore
parent 9070ca26
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,4 @@
mariadb
phpmyadmin
sessions
......@@ -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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment