An empty sample Laravel project for Docker, Using: PHP @ 8.1 NGINX @ Stable MYSQL @ Latest Composer & Npm with NodeJS @ Latest
-
Copy the mysql.env.example in the env folder to mysql.env and fill out the project details
-
Install the vendor dependencies
docker-compose run --rm composer install
-
Copy the .env.example found in src to .env and fill out the project details making sure they match the mysql.env values.
-
Generate a new app key by running
docker-compose run --rm artisan key:generate
-
Start the server and start developing
docker-compose up -d server
You can stop the server with
docker-compose down
All artisan commands withdocker-compose run --rm artisan [your input]
All composer commands withdocker-compose run --rm composer [your input]
All npm commands withdocker-compose run --rm npm [your input]
Database is not persistent, let me know if you need it to be 😉