Giter Site home page Giter Site logo

jahama / docker-laravel-angular Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ucrem/docker-laravel-angular

1.0 1.0 0.0 1.83 MB

Local environment for Laravel, Angular and Mysql

License: GNU General Public License v3.0

PHP 67.35% HTML 24.63% JavaScript 1.55% TypeScript 6.40% CSS 0.07%

docker-laravel-angular's Introduction

Docker

This template has been designed to meet the following requirements:

A backend container with official dockerhub image php: 7.4-fpm PHP version 7.4 and Supervisor with php command artisan queue: work

A frontend container with the official dockerhub node image: latest and angular CLI

A mysql container with official mysql: latest dockerhub image

A phpmyadmin container with the official dockerhub image phpmyadmin / phpmyadmin, linked to the mysql container in order to access the DB

A webserver container with the official image of the dockerhub nginx: alpine

Init Docker

The /docker/backend/supervisor/supervisord.conf file is linked in the backend container. Editing that file is instantly replicated to the container

First installation

Proceed with the copy of the .env.example file for setting the project and user name to be created for DB mysql

cp .env.example .env

then:

docker-compose build

Wait for everything to be configured

Then:

docker-compose up -d

Once all the containers are initialized, you need to connect to the backend container:

docker exec -t -i backend / bin / bash

we will find ourselves already in the folder / var / www / backend

Proceed with the copy of the .env.example file ( Change only mysql db name, user and password with the same .env docker istance)

cp .env.example .env

we install all the dependencies:

composer install

For the backend it is not necessary to execute the command php artisan because the nginx container is linked on the public laraver folder

As for the frontend (Angular) I made sure to expose the 4200, in this way you edit the file locally but links it on the docker instantly and angular cli does the rest on the docker.

So here are the links currently configured:

backend: localhost:8000

frontend: localhost:4200

phpmyadmin: localhost:7000

docker-laravel-angular's People

Contributors

ucrem avatar

Stargazers

Roman avatar

Watchers

James Cloos 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.