Laravel single page application build with VUE & VuetifyJs features integrations:
- Docker & docker-compose
- Kubernetes deployment
- A separate worker node to process queued jobs and auto scale independently from the main application containers
- Laravel horizon
- Pusher push notifications
- MongoDB to forget database migrations and move on
# clone this repository
git clone https://github.com/markhilton/laravel-spa
# go into the project
cd laravel-spa
# create a .env file
cp .env.example .env
# generate a key for your application & JWT server secret
php artisan key:generate
php artisan jwt:secret
# deploy stack with docker compose
docker-compose up
give it some time after first, initial deployment for Composer
and NPM to download all required vendor libraries and packages.
The node container will watch for file changes as you work with VUE components and automatically
mix app.js
, app.css
files as needed and create new mix-manifest.json
.
You can watch progress on docker-compose log output.
I work with Google Cloud GKE and usually leverage
Google Cloud Build to automatically build my app images when the code is pushed to repository and tagged,
so I share my cloudbuild.yaml
here too and can post integration instructions if anybody asks.
I will add my Helm chart for Kubernetes deployment soon.
Afik Deri, his repository which I forked and some great YouTube tutorials
Why use own docker images instead Laradock?
I've build my own Nginx and PHP Docker containers because I wanted to have out of the box, full-blown images I can control just with environment variables without having to build them every time I start a new project. They are not light-weight, rather have all necessary PHP extensions or Nginx modules I ever needed.
Don't worry about Laravel route error during containers initialization.
LogicException : Unable to prepare route [{any}] for serialization. Uses Closure.