-
Clone this project:
$ git clone https://github.com/marydn/users
-
Move to the project folder:
$ cd users
-
Start the project:
$ make build
This will install PHP dependencies, bring up the Docker containers with Docker Compose and load fixtures in database.
-
Check everything's up:
$ docker-composer ps
It should show
nginx
,php
andmysql
services up. -
Go to
http:://localhost:8000
in your browser -
By default, local database created by Docker is used in
.env
fileTo override this parameter:
$ touch .env.local $ echo "DATABASE_URL='sqlite:///XXXXX.sqlite'" >> .env.local
To fill the new database with fixtures:
make fixtures
- Bringing up the project using Docker:
$ make
- Bringing down the project:
$ make destroy
- Rebuild Docker images forcing latest versions and ignoring cache:
$ make rebuild
This is a simple demo project to search users with custom attributes values.
$ tree -L 4 src
src
├── Controller
│ └── GetUsersController.php
├── DataFixtures
│ └── AppFixtures.php
├── Entity
│ ├── Attribute.php
│ ├── UserHasAttribute.php
│ └── User.php
├── Repository
│ └── UserRepository.php
├── Resources
│ └── config
│ └── doctrine
│ ├── Attribute.orm.yml
│ ├── UserHasAttribute.orm.yml
│ └── User.orm.yml
└── Service
└── UserManager.php