This application is a demo. I'm using context based modules, approach that I took out of the Elixir/Phoenix environment.
To run the demo locally, you will need:
- Docker;
- docker-compose;
- PHP +7.2 & Composer;
- Node & yarn;
With those, you can proceed to the steps bellow:
- Clone this repo
- Run
cp .env.example .env - Run
composer install - Run
docker-compose up -d - Run
docker-compose exec app bashto get a shell inside the application container and run the migrations and passport install commands on it:- Run
php artisan key:generate(for local env only) - Run
php artisan migrate - Run
php artisan db:seed(for local env only) - Run
php artisan passport:install - Run
exitto get out of the container
- Run
- Pull and compile assets:
- Run
yarn && yarn dev
- Run
- Load the application in the browser at http://localhost. You can use these credentials to authenticate
- Email:
admin@example.com - Pass:
secret
- Email:
- Generate the API documentation (TODO):
- Run
composer generate:api-docs - Access http://localhost/api/docs
- Run
If you have problems with permission when loading the application, make sure you follow the steps:
- Run
chown -R $(id -u):www-data ./storage(to change the ownership of files in the storage folder) - Run
chmod -R ug+rw ./storage(to allow user and group to read and write in the storage folder)