Main ABRouter product repository that contains docker-compose file and orchestrates the project containers.

Overview

ABRouter-Compose 📟

ABRouter is the open-source tool to perform and track A/B tests which is also known as the experiments. Additionally, feature flags management system, built-in statistics is also included in the project.

The project provides high level of support for Laravel, Symfony and vanilla PHP.

You're welcome to visit the docs.

Features

🛠 A/B Tests

🛠 Feature flags

🛠 Built-in statistics

🛠 Incredible UI to manage it

Technologies used

⚙️ Laravel

⚙️ React

⚙️ JQuery

⚙️ Traefik

⚙️ PHP

⚙️ MySQL

⚙️ Consul

⚙️ Redis

⚙️ JSON API

Core components

Compose

Repository itself. Responsible for managing docker project structure contains docker-compose.yml and essential makefile-commands to set up it.

Containers: traefik, consul, api container, frontend container, Redis, MySQL.

API

API repository, based on the Laravel. Communicating via JSON API and REST API.

Front

Frontend repository, also based on the Laravel and contains React and vanilla JS.

Could send the requests to abr-api to handle user authorization for respond with partially rendered html.

Traefik

Routing all incoming requests between abr-api and abr-front and providing ssl. It's possible to set up additional services via traefik to make the requests from api or front.

Requirements

It's possible to set up ABRouter locally or on the remote host on AWS, Digital Ocean, Linode, etc.

Make sure docker and PHP installed on your machine. Recommended versions:

docker >= 18.0.0
php >= 5.6.0
docker-compose >= 1.20.0 

Currently, public configuration contains config only for manual deploy to the single machine, but it will be enough to handle millions of the api requests with vertical scaling (scaling CPU and RAM of the node that handle requests).

Deploy

0.Cloning

mkdir abr
cd abr
git clone [email protected]:abrouter/compose.git
git clone [email protected]:abrouter/api.git
git clone [email protected]:abrouter/front.git

1.Docker-compose.yml

Generate the docker-compose.yml file. For development purposes use the following command (workdir compose):

cd compose
make build-dev

If you want to set up it in the production mode please use the following:

make build-prod

The difference is in SSL, and ports. You can see it in /build/compose.php.

2. Build and start the containers

make up

or

docker-compose up -d

3. Install PHP dependencies

This command will install the composer dependencies in api and front container.

make install

4. Seed the consul keys

Next, we have to write the consul keys

make fill-consul

5. Generating .env files

This command will generate .env files in both containers.

make consul

6. Copy dependencies to the local machine from docker

Due to problems with relationship of Mac OS and Docker some files is not mounted to the working volume. Only directories are mounted directly to the container. So, you will probably have to perform some additional actions for local development.

cd ../abr-api
make sync-container-to-local

This command will copy /vendor, composer.lock, composer.json and .env files to the local machine. Both repositories have this command.

Please, note, when you want to add new dependencies to the project - did "composer require ..." in docker container and then, flush the installed dependencies and composer-files to your local machine to commit it.

The same command, if your composer-files is outdated in container. Then, make install to update dependencies.

cd ../abr-api
make sync-local-to-container

7. Database

docker exec -it abr-mysql sh
mysql -u root -p #password is bestpass
CREATE DATABASE IF NOT EXISTS `abr`;
CREATE DATABASE IF NOT EXISTS `abr_test`;

abr_test is using for testing purposes. Database is switching on running the tests.

And migrate:

make migrate

8. Authorization

Create oauth keys. Files will be created in /app/storage/. Please, be carefully and save oauth-*.key somewhere, because it's not included in the build. Losing this files can cause the loose of access to the accounts on your server.

make passport

That's all what we need to deploy ABRouter 🎉 .

You might also like...
🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

🐋 This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

This repository contains research materials and dev notes for the DSM research

DSM Research This repository contains a loosely-organized information regarding the processes of DSM loading. A lot of information present here was co

This repository contains academic codes from experiments and labs I did during my academic years.

Table Of Content Semester 3 Business Communication Skills Computer Graphics Digital Electronics and Logic Design Fundamentals of Data Structures Human

This package provides a set of factories to be used with containers using the PSR-11 standard for an easy Doctrine integration in a project

psr-container-doctrine: Doctrine Factories for PSR-11 Containers Doctrine factories for PSR-11 containers. This package provides a set of factories to

This repository contains the codebase PHP bridge using RoadRunner Jobs plugin.

RoadRunner Jobs Plugin This repository contains the codebase PHP bridge using RoadRunner Jobs plugin. Installation To install application server and J

This Repository contains a custom Workflow for Alfred which provides the function to instantly search in the Magento 2 DevDocs
This Repository contains a custom Workflow for Alfred which provides the function to instantly search in the Magento 2 DevDocs

Introduction Add the custom search to your Alfred Workflow and have a quicker access to the Magento 2 DevDocs. Installation Just download the alfredwo

This repository contains the code for the front end/UI of the login system
This repository contains the code for the front end/UI of the login system

Bug-free-login This repository contains the code for the front end/UI of the login system Requirements PHP 5.5.0 or higher. How to use Download ZIP wi

Magento 2 Product PDF/File Attachment FREE Extension
Magento 2 Product PDF/File Attachment FREE Extension

Overview: Magento 2 Product Attachment extension allows attaching additional information such as manuals, warranty, recipes, etc. in different formats

Docker-magento - Docker image for Magento 1.6 to 1.9

Docker image for Magento 1.x This repo creates a Docker image for Magento 1.x. Please note The primary goal of this repo is to create Docker images fo

Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

Meanbee 454 Dec 27, 2022
All about docker projects either from dockerfile or compose. Anyway, here the project is in the form of a service, for the programming language I will make it later

Docker Project by ItsArul Hey, yo guys okay, this time I made some projects from Docker. Anyway, this project is open source, for example, if you want

Kiyo 10 Nov 4, 2022
Quick start Symfony 5 project via docker-compose

Quick Docker Symfony This repository will allow you to start a Symfony project very quickly with PostgreSQL 14, pgAdmin 4 and one of three php version

null 2 Aug 7, 2022
A simple mini pos that handles managing product data's and product categories

What is CodeIgniter CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP. Its goal is to enable

Mahendra Dwi Purwanto 0 Dec 26, 2021
Magento 2.4.4 CE docker compose

REQUIREMENTS Docker https://docs.docker.com/desktop/install/windows-install/ Git https://git-scm.com/download/win STOP LOCAL SERVERS (XAMPP, OPENSERVE

null 5 Sep 11, 2022
Enhancement to Magento to allow simple product prices to be used instead of the default special-case configurable product prices

Simple Configurable Products Extension For Magento This documentation applies to SCP versions 0.7 onwards. The documentation for SCP v0.6 and earlier

Simon King 288 Nov 7, 2022
Magento 2 Module that adds Donation Product Type. Enables the customer to add a donation (product) of a preferred amount to the cart.

Magento 2 Module Experius DonationProduct (RC1.0) Demo website: https://donationproduct.experius.nl Magento Marketplace: https://marketplace.magento.c

Experius 23 Apr 1, 2022
Easily install PHP extension in Docker containers

Easy installation of PHP extensions in official PHP Docker images This repository contains a script that can be used to easily install a PHP extension

Michele Locati 2.8k Jan 4, 2023
A Magento Development Environment Made of Docker Containers

Docker for Magento 1 Extension Development Tl;dr How do I use this? Clone it. Type docker-compose up -d. Install a Magento Mount your file share. Deve

Michael A. Smith 99 May 10, 2021
OSX/Linux Docker containers installer for Magento 2

Magento 2 OSX/Linux Docker Requirements MacOS: Docker, docker-sync, Git Linux: Docker, Docker-compose, Git on Debian based OS (Example: Ubuntu, Linux

Osiozekhai Aliu 54 Dec 10, 2022