- I'm assuming that you have Docker installed and configured for your OS (strongly recommend using WSL2 if you're using Windows)
Assuming you're in the root dir:
- Copy
.env.example
=>.env
cp .env.example .env
- Build containers
docker-compose up -d
- Nginx and MySQL ready to go. By default, the server will be running at http://127.0.0.1:8000.
- Copy
src/.env.example
=>src/.env
cp src/.env.example src/.env
- Install dependencies
docker-compose run --rm composer install
- Generate APP_KEY
docker-compose run --rm artisan key:generate
- Make sure to change the
.env
data of your Laravel project to match the database info you provided to the.env
on the root folder of this project.
docker-compose run --rm node npm #NPM command (install, run dev...)
docker-compose run --rm php #PHP command