This is a github repository with files used to start a Laravel project using Docker.
Before you get started, you'll need to have installed the following
features: Git, Docker, Node, Make.
- Via SSH
$ git clone git@github.com:lmiguelcolombo/laravel-docker-app-init.git
- Via HTTPS
$ git clone git@github.com:lmiguelcolombo/laravel-docker-app-init.git
- Via Github CLI
$ gh repo clone lmiguelcolombo/laravel-docker-app-init
Then, rename the directory and enter on it:
$ mv laravel-docker-app-init name-of-your-project
$ cd name-of-your-project
Then, you're going to access the docker-compose.yml
file and replace the xxxxx
with the name of your project. After that, run the following commands:
$ make init
$ make laravel-init
After this, the Laravel project will be inside a folder, you could move all the files and folders to the root project and run:
$ make init
Then, run this commands:
$ nvm install 18.16
$ nvm use 18.16
$ npm install
$ npm run dev
Open your browser and visit https://localhost:8000 to access your Laravel application running!
Then, just code and coffee! 🧑💻 ☕️
-
make stop
will stop (not kill) the docker container. When you'll want to return soon and continue to coding, use it. -
make start
start (again) the containers stopped by the command above. The advantage of usingstart
andstop
is that you don't need to wait all the docker container to build up again. -
make down
will kill the docker container. -
make up
will build up the docker container again.