georgestav / laravel-nginx

Laravel & PHP & NGINX & MYSQL - Dockerised. An empty sample Laravel project for Docker, Using: PHP @ 8.1 NGINX @ Stable MYSQL @ Latest Composer & Npm with NodeJS @ Latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel & PHP & NGINX & MYSQL - Dockerised

Docker Laravel MySQL PHP Nginx NPM NodeJS

An empty sample Laravel project for Docker, Using: PHP @ 8.1 NGINX @ Stable MYSQL @ Latest Composer & Npm with NodeJS @ Latest

How to run the project

  1. Copy the mysql.env.example in the env folder to mysql.env and fill out the project details

  2. Install the vendor dependencies
    docker-compose run --rm composer install

  3. Copy the .env.example found in src to .env and fill out the project details making sure they match the mysql.env values.

  4. Generate a new app key by running
    docker-compose run --rm artisan key:generate

  5. Start the server and start developing
    docker-compose up -d server

Other commands:

You can stop the server with docker-compose down
All artisan commands with docker-compose run --rm artisan [your input]
All composer commands with docker-compose run --rm composer [your input]
All npm commands with docker-compose run --rm npm [your input]

Sidenote:

Database is not persistent, let me know if you need it to be 😉

About

Laravel & PHP & NGINX & MYSQL - Dockerised. An empty sample Laravel project for Docker, Using: PHP @ 8.1 NGINX @ Stable MYSQL @ Latest Composer & Npm with NodeJS @ Latest


Languages

Language:PHP 80.4%Language:Blade 17.6%Language:Shell 0.9%Language:Dockerfile 0.6%Language:JavaScript 0.6%