Skip to content

Commit

Permalink
docs: update readme (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
qroques authored Apr 18, 2023
1 parent bc06513 commit d05e19f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 13 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{php,js}]
block_comment_start = /**
block_comment = *
block_comment_end = */

[Makefile]
indent_style = tab
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ database-create:

.PHONY: database-drop
database-drop:
docker-compose run --rm php bin/console doctrine:database:drop --force
docker-compose run --rm php bin/console doctrine:database:drop --if-exists --force

.PHONY: fixtures-load
fixtures-load:
docker-compose run --rm php bin/console doctrine:fixtures:load
docker-compose run --rm php bin/console doctrine:fixtures:load

.PHONY: reset-db
reset-db: database-drop database-create database-migrate fixtures-load
41 changes: 30 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Symfony Training

This is the boilerplate project for KNP Labs Symfony training.

## Requirements

To run this project with docker you will need:

- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/)

## Installation

```bash
Expand All @@ -8,7 +17,7 @@ make start

### Migrations

One the stack has started, you may apply Doctrine migrations once MySQL is ready.
Once the stack has started, you may apply Doctrine migrations:

```bash
make database-create
Expand All @@ -17,15 +26,25 @@ make database-migrate

You can now access the application on [localhost](http://127.0.0.1/login).

### Fixtures

For most of trainings, you will need some fixtures to be loaded. To do so, run:

```bash
make fixtures-load
```

At this point, you should be able to log in and access the application (Email: `[email protected]`, Password: `admin`)

## Commands

| Commands | Description |
|----------------- |-----------------------------------|
| start | Setup and start the stack |
| cp-env | Copie default .env if none exists |
| build | Build Docker's container |
| install-deps | Install Composer dependencies |
| database-create | Create database if none exists |
| database-drop | Drop database |
| database-migrate | Run Doctrine migrations |
| fixtures-load | Load fixtures |
| Commands | Description |
|------------------|-----------------------------------|
| start | Setup and start the stack |
| cp-env | Copie default .env if none exists |
| build | Build Docker's container |
| install-deps | Install Composer dependencies |
| database-create | Create database if none exists |
| database-drop | Drop database |
| database-migrate | Run Doctrine migrations |
| fixtures-load | Load fixtures |

0 comments on commit d05e19f

Please sign in to comment.