- Notifications
You must be signed in to change notification settings - Fork0
mozan/docker-apache-php-symfony
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Docker environment required to run Symfony (based on official php and mysql docker hub repositories).
- Docker version 18.06 or later
- Docker compose version 1.22 or later
- An editor or IDE
- MySQL Workbench
Note: OS recommendation - Linux Ubuntu based.
- Apache 2.4
- PHP 7.4 (Apache handler)
- MySQL 8
- Symfony 4 LTS
- RabbitMQ 3
1.Clone this repository from GitHub.
2.Edit docker-compose-prod.yml and set necessary user/password for MySQL and RabbitMQ.
Note: Delete var/mysql-data folder if it is exist.
3.Edit env.prod and set necessary user/password for MySQL and RabbitMQ.
4.Build, start and install the docker images from your terminal:
make build-prodmake start-prod
5.Make sure that you have installed migrations / messenger transports:
make migrate-no-testmake messenger-setup-transports
1.Clone this repository from GitHub.
Note: Delete var/mysql-data folder if it is exist.
2.Build, start and install the docker images from your terminal:
make build-stagingmake start-staging
3.Make sure that you have installed migrations / messenger transports:
make migrate-no-testmake messenger-setup-transports
1.Clone this repository from GitHub.
2.Set another APP_SECRET for application in .env.prod and .env.staging files.
Note 1: You can get unique secret key for examplehere.
Note 2: Do not use .env.local.php on dev and test environment (delete it if exist).
Note 3: Delete var/mysql-data folder if it is exist.
3.Add domain to local 'hosts' file:
127.0.0.1 localhost
4.Configure/docker/dev/xdebug.ini (optional):
- In case you need debug only requests with IDE KEY: PHPSTORM from frontend in your browser:
xdebug.start_with_request = no
Install locally in Firefox extension "Xdebug helper" and set in settings IDE KEY: PHPSTORM
- In case you need debug any request to an api (by default):
xdebug.start_with_request = yes
5.Build, start and install the docker images from your terminal:
make buildmake startmake composer-install
6.Make sure that you have installed migrations / messenger transports:
make migratemake messenger-setup-transports
7.In order to use this application, please open in your browser next url:http://localhost.
After application will start (make start) and in order to get shell access inside symfony container you can run following command:
make ssh
Note 1: Please use next make commands in order to enter in other containers:make ssh-supervisord,make ssh-mysql,make ssh-rabbitmq.
Note 2: Please useexit command in order to return from container's shell to local shell.
In case you edited Dockerfile or other environment configuration you'll need to build containers again using next commands:
make stopmake buildmake start
Note 1: Please use next command if you need to build staging environmentmake build-staging insteadmake build.
Note 2: Please use next command if you need to build prod environmentmake build-prod insteadmake build.
Please use next make commands in order to start and stop environment:
make startmake stop
Note 1: For staging environment need to be used next make commands:make start-staging,make stop-staging.
Note 2: For prod environment need to be used next make commands:make start-prod,make stop-prod.
make buildmake build-testmake build-stagingmake build-prodmake startmake start-testmake start-stagingmake start-prodmake stopmake stop-testmake stop-stagingmake stop-prodmake restartmake restart-testmake restart-stagingmake restart-prodmake env-stagingmake env-prodmake sshmake ssh-supervisordmake ssh-mysqlmake ssh-rabbitmqmake composer-install-no-devmake composer-installmake composer-updatemake infomake logsmake logs-supervisordmake logs-mysqlmake logs-rabbitmqmake drop-migratemake migratemake migrate-no-testmake fixturesmake messenger-setup-transportsmake phpunitmake report-code-coveragemake phpcsmake ecsmake ecs-fixmake phpmetricsmake phpcpdmake phpmdmake phpstanmake phpinsightsetc....
Notes: Please see more commands in Makefile
- Symfony 4
- apache-pack
- doctrine-migrations-bundle
- doctrine-fixtures-bundle
- command-scheduler-bundle
- phpunit
- phpunit-bridge
- browser-kit
- css-selector
- security-checker
- messenger
- serializer-pack
- composer-bin-plugin
- ergebnis/composer-normalize
- symfony/requirements-checker
- security-advisories
- php-coveralls
- easy-coding-standard
- PhpMetrics
- phpcpd
- phpmd
- phpstan
- phpinsights
- For new feature development, fork
developbranch into a new branch with one of the two patterns:feature/{ticketNo}
- Commit often, and write descriptive commit messages, so its easier to follow steps taken when reviewing.
- Push this branch to the repo and create pull request into
developto get feedback, with the formatfeature/{ticketNo}- "Short descriptive title of Jira task". - Iterate as needed.
- Make sure that "All checks have passed" on CircleCI(or another one in case you are not using CircleCI) and status is green.
- When PR is approved, it will be squashed & merged, into
developand later merged intorelease/{No}for deployment.
About
Docker environment required to run Symfony (based on official php and mysql docker hub repositories)
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- PHP76.3%
- Makefile10.0%
- Dockerfile7.3%
- Shell4.3%
- Smarty1.6%
- Twig0.5%