Skip to content

Base project of PHP oriented to DDD (Domain Driven Design), CQRS, Hexagonal Architecture and Microservices and using Docker, Nginx, Yarn, SCSS, Mysql, Symfony Flex and Symfony 4. This is the Old Version, the new repository: https://github.com/Fiser12/Base-Docker-Microservices

Notifications You must be signed in to change notification settings

Fiser12/PHPDDDStandar-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPDDDStandar use the base of Lin3s

Description

In this repository I create a Base of the PHPDDDStandar using docker for simplify the development with a Mysql database, nginx, docker and php-ftm. The idea of this repository is to evolve it to automate deployments using docker. Currently the development environment is built with a makefile.

Getting Started

These instructions will get you a copy of the project up and running on your local machine. See deployment for notes on how to deploy the project on a live system.

Prerequisites

How to run

This project is fully Dockerized and orchestrated with Docker Compose.

How to install

Mac OS

Ubuntu

Download and install Docker

wget -qO- https://get.docker.com/ | sh

Prepare permissions for Docker

sudo usermod -aG docker $(whoami)

Install Docker Compose

sudo apt-get update

sudo apt-get -y install python-pip

pip install 'docker==2.6.1'

This version is necesary because in the 2.7 fails if you have symbolic links broken, this are generated in the docker image and in the volume you see a symbolic link broke.

sudo groupadd docker

sudo usermod -aG docker $USER

Prepare the environment:

For deploy in dev or prod mode the project have a makefile with the needed commands.

make build ENV=dev

make build ENV=prod

The objetives of this base project are this:

  • Separation between enviroments in Docker and Symfony Application
  • Makefile that simplify the operations with Symfony and Docker
  • Automatize deploy of dev
  • Automatize database preparation with migrations when you deploy
  • Production enviroment build
  • Production enviroment deploy
  • Test enviroment with PHPSpec and Docker
  • Test enviroment with Behat and selenium tests
  • Paralelize the tests with docker in multiple instances
  • Microservices separation using Docker, Nginx and Symfony applications

You have more information of this objetives in Projects section of Github Page