Skip to content

Latest commit

 

History

History
82 lines (65 loc) · 2.16 KB

README.md

File metadata and controls

82 lines (65 loc) · 2.16 KB

Docker Symfony setup

Docker setup for symfony or other php projects. It currently supports MacOS (Mutagen + mutagen-compose) and Unix (native docker volumes). This repository currently contains support for PHP 7.2 up to PHP 8.2.1. Just checkout the needed tag and you're good to go.

Current Specs

  • PHP: 8.2.12
  • PHP modules: Xdebug 3, redis, amqp, soap, pcov, opcache, apcu
  • Composer 2.4.4
  • MySQL: 8.0.33
  • NPM: 8.19.3, NVM: 0.39.1, NODE: 16.19.0 LTS, YARN: 1.22.19, BUN: 1.0.13
  • Symfony-cli
  • Deployer
  • ZSH
  • Mutagen + mutagen-compose (Required on MacOS) / native docker volumes (OS will be detected)
  • Docker container for: mysql, redis, rabbitmq and mailcatcher

Setup

Checkout your project into the /www directory and set the APACHE_DOCUMENT_ROOT env in the docker-compose file, to match your framework / setup. Type ./docker.sh to see a help message for additional commands.

Start setup

./docker.sh start

Stop Setup

./docker.sh stop

Connect into container

./docker.sh ssh

Build project

./docker.sh setup

Stop and remove docker container with their volumes

./docker.sh rm

Symfony full install

It runs symfony new --webapp ./ inside the docker container working dir. After that you'll have a running symfony default application. Change the DB credentials in the www/.envand you are good to go

./docker.sh symfony:full

Symfony microservice install

It runs symfony new ./ inside the docker container working dir. After that you'll have a running symfony microservice application. Change the DB credentials in the www/.envand you are good to go

./docker.sh symfony:micro

Enables xdebug

./docker.sh xdebug:on

Disables xdebug

./docker.sh xdebug:off

Aliases

if you connect into the container, it will have the following aliases:

Enable xdebug

xdebug-enable

Disable xdebug

xdebug-disable