Skip to content

Laravel Single Page Application build with VUE, Vuetify, integrating MongoDB, Pusher, Docker & Kubernetes

Notifications You must be signed in to change notification settings

markhilton/laravel-spa

 
 

Repository files navigation

Laravel Single Page Application

Laravel single page application build with VUE & VuetifyJs features integrations:

Local deployment

# 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.

Production deployment

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.

Credits

Afik Deri, his repository which I forked and some great YouTube tutorials

FAQ

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.

Troubleshooting

Don't worry about Laravel route error during containers initialization.

LogicException  : Unable to prepare route [{any}] for serialization. Uses Closure.

About

Laravel Single Page Application build with VUE, Vuetify, integrating MongoDB, Pusher, Docker & Kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 67.6%
  • Vue 30.0%
  • Other 2.4%