- Laravel 6.x
- Docker >= 18.06.1-ce
- Docker-compose >= 1.24.0
- PHP >= 7.3
- Mysql >= 5.7
- Nginx > = nginx/1.15.7
- Yarn >= 1.15.0
-
Copy file
.env.example
to.env
, -
Modify
.env
config file (optional). If you modify themysql
,mongo
,redis
configurations in.env
file, remember to modify the configurations indocker-compose.yml
file too. -
Install or run Docker
docker-compose up -d
# Stop
docker-compose stop
- Site will publish on 127.0.0.1:{
ports
} (ports
config in docker-compose.yml > services > ngix > ports). Add domain to host file so we can access site by domain:{ports
} (edit host in file ./ect/hosts)
127.0.0.1 rogschedule.local
- Asset project with domain
rogschedule.local:2021 or localhost:2021 or 127.0.0.1:2021
chmod
cache folders
chmod -R 777 storage
chmod -R 777 bootstrap/cache
- Go into the
workspace
container
docker exec -it rogschedule_workspace bash
composer install
php artisan key:generate
- Install node modules
yarn install
- Build
yarn run dev
- Run migration
# Check Docker Container list, copy the `workspace` container name
docker ps
# Go into the `workspace` container
docker exec -it rogschedule_workspace bash
# Run migration
php artisan passport:install
php artisan migrate --seed
# Or running outside the docker container
docker exec -it rogschedule_workspace php artisan migrate --seed
- If you want run project on your local instead of Docker, just skip all step about docker and create virtual host. And modify
.env
config ofDB_HOST
,DB_HOST_TEST
,REDIS_HOST
to127.0.0.1
# Check eslint convention
yarn run eslint
# Fix eslint auto
yarn run eslint:fix
# Configuration deploy with Deployer ( deploy.php )
dep deploy -vv
# Library configuration file public
Add SENTRY_LARAVEL_DSN key to .env
php artisan vendor:publish --provider="Sentry\Laravel\ServiceProvider"
# change LOG_CHANNEL from stack to daily in .env
APP_URL=http://localhost
LOG_CHANNEL=daily
Go to http://localhost:2021/log-viewer