All Projects → eko → Docker Symfony

eko / Docker Symfony

Licence: other
Run a Symfony application using Docker & docker-compose

Projects that are alternatives of or similar to Docker Symfony

Docker Symfony
🐳 A docker multicontainer with NGINX, PHP7-FPM, MySQL and ELK (Elasticsearch Logstash and Kibana)
Stars: ✭ 1,305 (+7.23%)
Mutual labels:  symfony, nginx
Vagrant Elastic Stack
Giving the Elastic Stack a try in Vagrant
Stars: ✭ 131 (-89.24%)
Mutual labels:  nginx, kibana
Docker Elastic Stack
ELK Stack Dockerfile
Stars: ✭ 175 (-85.62%)
Mutual labels:  nginx, kibana
Stacker
Stacker - The environment for local web development, ready for use.
Stars: ✭ 356 (-70.75%)
Mutual labels:  symfony, nginx
Vagrant Php Dev Box
PHP 7 vagrant development box with nginx, php-fpm, MySQL, Symfony, Laravel, ... on Ubuntu 16.04
Stars: ✭ 473 (-61.13%)
Mutual labels:  symfony, nginx
Medusa
🐈Medusa是一个红队武器库平台,目前包括扫描功能(200+个漏洞)、XSS平台、协同平台、CVE监控等功能,持续开发中 http://medusa.ascotbe.com
Stars: ✭ 796 (-34.59%)
Mutual labels:  nginx, kibana
Php Docker Boilerplate
🍲 PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
Stars: ✭ 503 (-58.67%)
Mutual labels:  symfony, nginx
Docker Skeleton Php
A simple Docker PHP development environment
Stars: ✭ 40 (-96.71%)
Mutual labels:  symfony, nginx
Logstash
OSSEC + Logstash + Elasticsearch + Kibana
Stars: ✭ 74 (-93.92%)
Mutual labels:  kibana
Sonataclassificationbundle
Symfony SonataClassificationBundle
Stars: ✭ 76 (-93.76%)
Mutual labels:  symfony
Http Client
The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously.
Stars: ✭ 1,186 (-2.55%)
Mutual labels:  symfony
Console
The Console component eases the creation of beautiful and testable command line interfaces.
Stars: ✭ 8,988 (+638.54%)
Mutual labels:  symfony
Generic django project
starting point for a new Django site (with FeinCMS, deployable on Nginx using Fabric)
Stars: ✭ 76 (-93.76%)
Mutual labels:  nginx
Docker For Local Development
This project provides a basic Docker setup, for building a local development environment for Zend Expressive, and other PHP application development.
Stars: ✭ 74 (-93.92%)
Mutual labels:  nginx
Shorty
🔗 A URL shortening service built using Flask and MySQL
Stars: ✭ 78 (-93.59%)
Mutual labels:  nginx
Insight
SymfonyInsight Official SDK
Stars: ✭ 73 (-94%)
Mutual labels:  symfony
Cronos Bundle
Easy update your crontab by using @cron annotations in Symfony commands.
Stars: ✭ 73 (-94%)
Mutual labels:  symfony
Router
Edge router for Deis Workflow
Stars: ✭ 78 (-93.59%)
Mutual labels:  nginx
Kibananestedsupportplugin
A plugin for Kibana 5.5 and beyond that adds support for nested field search and aggregation.
Stars: ✭ 78 (-93.59%)
Mutual labels:  kibana
Rare
Fast, realtime regex-extraction, and aggregation into common formats such as histograms, numerical summaries, tables, and more!
Stars: ✭ 76 (-93.76%)
Mutual labels:  nginx

docker-symfony

Build Status

This is a complete stack for running Symfony 5 (latest version), PHP8 and ELK stack using docker-compose tool.

Installation

First, clone this repository:

$ git clone https://github.com/eko/docker-symfony.git

Next, put your Symfony application into symfony folder and do not forget to add symfony.localhost in your /etc/hosts file.

Make sure you adjust database_host in parameters.yml to the database container alias "db" (for Symfony < 4) Make sure you adjust DATABASE_URL in env to the database container alias "db" (for Symfony >= 4)

Then, run:

$ docker-compose up

You are done, you can visit your Symfony application on the following URL: http://symfony.localhost (and access Kibana on http://symfony.localhost:81)

Note : you can rebuild all Docker images by running:

$ docker-compose build

How it works?

Here are the docker-compose built images:

  • db: This is the MySQL database container (can be changed to postgresql or whatever in docker-compose.yml file),
  • php: This is the PHP-FPM container including the application volume mounted on,
  • nginx: This is the Nginx webserver container in which php volumes are mounted too,
  • elasticsearch: This is the Elasticsearch server used to store our web server and application logs,
  • logstash: This is the Logstash tool from Elastic Stack that allows to read logs and send them into our Elasticsearch server,
  • kibana: This is the Kibana UI that is used to render logs and create beautiful dashboards.

This results in the following running containers:

> $ docker-compose ps
             Name                           Command               State                 Ports
-----------------------------------------------------------------------------------------------------------
mysql                            docker-entrypoint.sh --def ...   Up      0.0.0.0:3306->3306/tcp, 33060/tcp
elasticsearch                    /usr/local/bin/docker-entr ...   Up      0.0.0.0:9200->9200/tcp, 9300/tcp
kibana                           /usr/local/bin/dumb-init - ...   Up      0.0.0.0:81->5601/tcp
logstash                         /usr/local/bin/docker-entr ...   Up      5044/tcp, 9600/tcp
nginx                            nginx                            Up      443/tcp, 0.0.0.0:80->80/tcp
php-fpm                          php-fpm7 -F                      Up      0.0.0.0:9000->9001/tcp

Read logs

You can access Nginx and Symfony application logs in the following directories on your host machine:

  • logs/nginx
  • logs/symfony

Use Kibana!

You can also use Kibana to visualize Nginx & Symfony logs by visiting http://symfony.localhost:81.

Use xdebug!

Start by updating your docker-compose.yaml file with ENABLE_PHP_XDEBUG: 1 under the php service. You will need to re-build the php container for this value to take effect.

Configure your IDE to use port 5902 for XDebug. Docker versions below 18.03.1 don't support the Docker variable host.docker.internal.
In that case you'd have to swap out host.docker.internal with your machine IP address in php-fpm/xdebug.ini.

Code license

You are free to use the code in this repository under the terms of the 0-clause BSD license. LICENSE contains a copy of this license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].