Giter Site home page Giter Site logo

rp70 / laravel-nuxt-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nevadskiy/laravel-nuxt-docker

0.0 0.0 0.0 1.44 MB

๐Ÿฆพ Dockerized template for your next project with Laravel and Nuxt.

Shell 20.01% Makefile 40.21% Dockerfile 39.78%

laravel-nuxt-docker's Introduction

Stand With Ukraine

Dockerized template for your next project with Laravel and Nuxt

Well tested on Ubuntu 18.04, 19.10 and 20.04.

๐Ÿฌ Stack includes

  • API
    • Laravel (latest version)
    • Octane
    • PostgreSQL (and separate database for testing)
    • Redis
    • MailHog
  • Client
    • Nuxt 3 (latest version)
  • Gateway
    • Nginx (as reverse-proxy)
    • Certbot

๐Ÿ“œ Introduction

The project is just separate preconfigured Laravel and Nuxt applications that are stored in the same monorepo.

Each app has its own docker templates for development and production and does not have the actual application code. So you can install and run them completely separate from each other. There are also no restrictions to add more, for example, a mobile application or an admin panel.

Single host

If you want to host API and client apps on the single host machine, you may set up subdomains rather than rely on published ports.

The project includes a simple gateway application that can easily help with this.

It can be also useful to run locally and set up an application to use subdomains and test CORS and other possible issues.

Of course, you can replace it with a more professional tool, like Traefik.

โš™ Installation

  1. Clone or download the repository and enter its directory:
git clone https://github.com/nevadskiy/laravel-nuxt-docker.git app
cd app
  1. Install the api application.
cd api
./install.sh

This will install and run a fresh new Laravel app which will be available on http://localhost:8000.

  1. Install the client application.
cd client
./install.sh

This will install and run a fresh new Nuxt 3 app which will be available on http://localhost:3000.

  1. (Optional) If you want to deploy your project using single host approach, install the gateway application according to its documentation. Otherwise, you can safely delete it. For local development you can ignore it as well.

๐Ÿ”Œ Network communication

The following image demonstrates the request paths in a local development environment.

Networking

API and WEB requests sent by the browser are proxied directly via published ports to the running server instances.

But the SSR request is sent by the node server, not the browser, and should be sent directly to the host of the API docker service.

๐Ÿ“‘ Documentation

โ˜• Contributing

If you see anything that can be improved, feel free to make a pull request. Contributions are welcome and will be fully credited.

laravel-nuxt-docker's People

Contributors

dependabot[bot] avatar devclouse avatar devzakir avatar juliangeissler avatar nevadskiy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.