Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

flemzord/docker-symfony

Repository files navigation

docker-symfony

Build Status

Just a little Docker POC in order to have a complete stack for running Symfony into Docker containers using docker-compose tool.

Installation

First, clone this repository:

$ git clone git@github.com:flemzord/docker-symfony.git

Next, put your Symfony application into symfony folder.

Make sure you adjust database_host in parameters.yml to the database container alias "db"

Then, run:

$ docker-compose up

You are done, you can visit your Symfony application on the following URL: http://DOCKER_IP

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,

This results in the following running containers:

> $ docker-compose ps
        Name                      Command               State              Ports
        -------------------------------------------------------------------------------------------
        docker_db_1            /entrypoint.sh mysqld            Up      0.0.0.0:3306->3306/tcp
        docker_nginx_1         nginx                            Up      443/tcp, 0.0.0.0:80->80/tcp
        docker_php_1           php5-fpm -F                      Up      9000/tcp

Read logs

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

  • logs/nginx
  • logs/symfony

Code license

Based on eko/docker-symfony
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.

About

🐳 Run a Symfony application using Docker & docker-compose 🐳

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages