Diag Corporate (Diag Website - diag.vn)
Setup Development Environment
Prepare steps:
For Intel PC and MAc
-
Install Node.js and NPM on Mac
-
Go to project path
-
Create
.env
filecp .env.example .env
-
We can use the default
docker-compose.yml
. Run docker-composedocker-compose up
-
Install dependency:
docker-compose exec app compose install
-
Run the database migration:
docker-compose exec app php artisan migrate
-
Build the mix for front-end
npm install npm run development
-
Access the web app at http://localhost:8002/
For Macbook M1 (any laptop use CPU ARM architect)
-
Go to project path
-
Create
.env
filecp .env.example .env
-
Running doc
docker-compose -f docker-compose-arm-dev.yml up
-
Install dependency:
docker-compose -f docker-compose-arm-dev.yml exec app composer install
-
Run the database migration:
docker-compose -f docker-compose-arm-dev.yml exec app php artisan migrate
-
Because we can not build front-end directly in Macbook M1 so that why we will build the mix for front-end in docker
docker-compose -f docker-compose-arm-dev.yml exec app npm install docker-compose -f docker-compose-arm-dev.yml exec app npm run development
-
Access the web app at http://localhost:8002/