Giter Site home page Giter Site logo

a24710 / docker-symfony-elk-filebeats-stack Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 0.0 365 KB

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.

Shell 0.28% PHP 97.80% Dockerfile 1.23% Twig 0.69%
docker docker-compose symfony5 elasticsearch elk-stack filebeats api-platform mysql elasticsearch-client fixture-data

docker-symfony-elk-filebeats-stack's Introduction

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.

docker-symfony-elk-filebeats-stack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.