Skip to content

Docker stack for Microservice architecture with Symfony 3.4, Symfony 4.2, included php7.2-fpm, php7.3-fpm, nginx, RabbitMQ, Redis, Centrifugo, Elasticsearch, Kibana + bonus Docker-Sync (for MacOS)

License

Notifications You must be signed in to change notification settings

RuslanKononov/docker-for-symfony

Repository files navigation

Docker stack for Symfony 3

Installation

  1. Install docker, docker-compose, docker-sync

  2. Create a .env from the .env.dist file and adapt it according to the needs of the application

    $ cp .env.dist .env && vim .env
  3. Build/run containers in detached mode and run docker-sync

    $ docker-compose build
    $ docker volume create --name=app-sync
    $ docker-compose up -d
    $ docker-sync start

    On the next run you may use $ docker-sync-stack start command which do docker-compose up && docker-sync start

    After rebuilding container or changing .yml file run $ docker-sync clean

  4. Update your system's hosts file

  5. Prepare the Symfony application

    1. Update Symfony parameters (app/config/parameters.yml)

    2. Composer install & create database

      $ docker-compose exec php bash
      $ composer install
      $ sf doctrine:database:create
      $ sf doctrine:schema:update --force
      $ sf server:start 0.0.0.0:8000
  6. Yarn

        $ docker-compose run --rm nodejs yarn install
        $ docker-compose run --rm nodejs yarn run [command]

    to run command in watch mode use --watch

        $ docker-compose run --rm nodejs yarn run [command] --watch

About

Docker stack for Microservice architecture with Symfony 3.4, Symfony 4.2, included php7.2-fpm, php7.3-fpm, nginx, RabbitMQ, Redis, Centrifugo, Elasticsearch, Kibana + bonus Docker-Sync (for MacOS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •