Symfony 5.2 + api platform project with ELK stack + elastic FileBeats for the log management. All running in 7 docker containers: nginx, php 8, mysql, elastic search, logstash, kibana, fileBeats.

Overview

Symfony with ELK and Elastic FileBeats Stack

Prerequisites: Make sure that docker and docker-compose are installed in your machine and available for your console

Download the repository code to a folder in your machine and setup all the needed docker containers running the command

docker-compose up --build

All containers should be up and running now.

The folder "var" was automatically created because it's a shared volume with the fileBeats container. We need to take ownership of this folder so later our php container does not have problems writing on it.

Open a new console and type (change 'ourUser' with your own user).

sudo chown -R ourUser var

Open a bash in the recently created php container with

docker exec -it php_cont bash

Run composer install within this bash (composer was installed during the docker php container setup)

composer install

Update the database schema with

php bin/console d:s:u --force

Load the data fixtures with

php bin/console doctrine:fixtures:load

Create the database for the test environment and populate it with fixture data

php bin/console doctrine:database:create --env=test
php bin/console d:s:u --force --env=test
php bin/console doctrine:fixtures:load --env=test

You can launch the provided tests with (It will install php unit the first time)

php bin/phpunit

A postman collection is available in the root directory to test all api methods. Please, notice that uuids are randomly generated, and the ones present in some postman urls are just placeholders. In order to test this urls replace the placeholder uuid with a real one you get from a get collection call.

Also, after generating the fixture data and hitting some endpoints using postman you can check elastic logs through kibana and your web browser 'localhost:5602'.

Check the "observability/logs" section by clicking in the hamburguer icon, then click on the "stream live" button and start using the postman to see the log data grow in real time!

If you want a deeper explanation check the "README extended.pdf" file in the root folder.

You might also like...
A Php Library For MySQL

phpSQL MySql İçin Bir Php Kütüphanesi Herhangi Bir Sorun Olursa Buradan Ulaşabilirsiniz Ayrıca Dosyada Php Documentor Kullanılmaktadır, Modern Editörl

A minimalistic PHP/MySQL anonymous bulletin-board thingy
A minimalistic PHP/MySQL anonymous bulletin-board thingy

minibord A minimalistic PHP/MySQL anonymous bulletin-board thingy mostly worked on at night It's a very basic, unthemed, table-based layout, but it wo

Tiny php mysql lib (PDO-based) with handy fetch/update functionality, supports both SQL and parametric queries

Micro PHP mysql lib (~ 200 lines of code) with ultra powerful CRUD for faster than ever development: parametric fetch/insert/update/delete (based on a

Simple MySQL library for PHP 5.4+ includes Query Builder, PDO Native functions, Helper functions for quick use.

Simple MySQL library for PHP 5.4+ includes Query Builder, PDO Native functions, Helper functions for quick use.

The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

Database lookup tool in php, skidlookup has not been claimed so if u want to use this src all right's go to u, idea came from fedsearch
Database lookup tool in php, skidlookup has not been claimed so if u want to use this src all right's go to u, idea came from fedsearch

skidlookup Database lookup tool in php, skidlookup has not been claimed so if u want to use this src, all right's go to u, idea came from fedsearch in

Database lookup tool in php, skidlookup has not been claimed so if u want to use this src all right's go to u, idea came from fedsearch
Database lookup tool in php, skidlookup has not been claimed so if u want to use this src all right's go to u, idea came from fedsearch

skidlookup Database lookup tool in php, skidlookup has not been claimed so if u want to use this src, all right's go to u, idea came from fedsearch in

Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.

Aura.SqlQuery Provides query builders for MySQL, Postgres, SQLite, and Microsoft SQL Server. These builders are independent of any particular database

A web interface for MySQL and MariaDB

phpMyAdmin A web interface for MySQL and MariaDB. https://www.phpmyadmin.net/ Code status Download You can get the newest release at https://www.phpmy

Owner
Senior backend symfony developer
null
MySQL replication status checker daemon in docker image with Slack notification.

MySQL replication checker - Docker MySQL replication status checker daemon in docker image with Slack notification. Envs Name Description MYSQL_HOST M

Aventail Ltd. 1 Jan 31, 2022
A Symfony application for managing and automating regular backups of MySQL databases.

DbSaver DbSaver is an application written by Bastien LOUGHIN allowing you to make automatic daily backups (and manual backups) for your MySQL database

Bastien 35 Nov 11, 2022
Connect and work with MySQL/MariaDB database through MySQLi in PHP. This is an introductory project, If you need a simple and straightforward example that takes you straight to the point, you can check out these examples.

First MySQLi PHP Connect and work with MySQL/MariaDB database through MySQLi in PHP. The above exercises are designed for students. This is an introdu

Max Base 4 Feb 22, 2022
Very easy to use PDO MYSQL API. Just Include in PHP file and get it working.

CRUD-MYSQL-API Very easy to use PDO MYSQL API. Just Include in PHP file and get it working. INSTALATION Step 1: git clone https://github.com/arhex-lab

Abdul Raheem 4 Jun 14, 2022
API abstracting communication with SQL providers (eg: MySQL) on top of PDO inspired by Java JDBC

SQL Data Access API Table of contents: About Configuration Execution Installation Unit Tests Examples Reference Guide About This API is a ultra light

Lucian Gabriel Popescu 0 Jan 9, 2022
TO DO LIST WITH LOGIN AND SIGN UP and LOGOUT using PHP and MySQL please do edit the _dbconnect.php before viewing the website.

TO-DO-LIST-WITH-LOGIN-AND-SIGN-UP TO DO LIST WITH LOGIN AND SIGN UP and LOGOUT using PHP and MySQL please do edit the _dbconnect.php before viewing th

Aniket Singh 2 Sep 28, 2021
PHP version of mysqldump cli that comes with MySQL

MySQLDump - PHP Requirements | Installing | Getting started | API | Settings | PDO Settings | TODO | License | Credits This is a php version of mysqld

diego torres 1.1k Jan 8, 2023
A simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure)

my little forum my little forum is a simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure).

Mark Hoschek 97 Dec 29, 2022
phpMyFAQ - Open Source FAQ web application for PHP and MySQL, PostgreSQL and other databases

phpMyFAQ 3.1 What is phpMyFAQ? phpMyFAQ is a multilingual, completely database-driven FAQ-system. It supports various databases to store all data, PHP

Thorsten Rinne 547 Dec 27, 2022
A simple and extensible fixture loader for PHP 7.3+, supporting SQLite and MySQL

Flowder Flowder is a (really) simple fixture loader for PHP 7.3+, supporting SQLite and MySQL. Using Flowder in PHP 7.2 or below? Try version 1 instea

Joe Haines 6 Jan 17, 2021