Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docker environment required to run Symfony (based on official php and mysql docker hub repositories)

NotificationsYou must be signed in to change notification settings

Mangetsu/docker-apache-php-symfony

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker environment required to run Symfony (based on official php and mysql docker hub repositories).

Actions StatusCircleCICoverage Status

Source code

Requirements

  • 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.

Components

  1. Apache 2.4
  2. PHP 7.4 (Apache handler)
  3. MySQL 8
  4. Symfony 4.4
  5. RabbitMQ 3

Setting up DEV environment

1.Clone this repository from GitHub.

2.Set another APP_SECRET for application in .env.prod file.

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).

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.remote_autostart = 0

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.remote_autostart = 1

5.Build, start and install the docker images from your terminal:

docker-compose buildmake startmake composer-install

6.Make sure that you have installed migrations:

make migrate

7.In order to use this application, please open in your browser next url:http://localhost/api/doc.

Getting shell to container

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-nginx,make ssh-supervisord,make ssh-mysql.

Note 2: Please useexit command in order to return from container's shell to local shell.

Building containers

In case you edited Dockerfile or other environment configuration you'll need to build containers again using next commands:

make stopdocker-compose buildmake start

Note: Please use next command if you need to build prod environmentdocker-compose -f docker-compose-prod.yml build insteaddocker-compose build.

Start and stop environment

Please use next make commands in order to start and stop environment:

make startmake stop

Note: For prod environment need to be used next make commands:make start-prod,make stop-prod.

Additional main command available

make startmake start-testmake start-prodmake stopmake stop-testmake stop-prodmake restartmake restart-testmake restart-prodmake env-prodmake sshmake ssh-supervisordmake ssh-mysqlmake ssh-rabbitmqmake composer-install-prodmake composer-installmake composer-updatemake infomake logsmake logs-supervisordmake logs-mysqlmake logs-rabbitmqmake drop-migratemake migratemake migrate-prodmake fixturesmake phpunitmake report-code-coveragemake phpcsmake ecsmake ecs-fixmake phpmetricsetc....

Notes: Please see more commands in Makefile

Architecture & packages

Guidelines

Working on your project

  1. For new feature development, forkdevelop branch into a new branch with one of the two patterns:
    • feature/{ticketNo}
  2. Commit often, and write descriptive commit messages, so its easier to follow steps taken when reviewing.
  3. Push this branch to the repo and create pull request intodevelop to get feedback, with the formatfeature/{ticketNo} - "Short descriptive title of Jira task".
  4. Iterate as needed.
  5. Make sure that "All checks have passed" on CircleCI(or another one in case you are not using CircleCI) and status is green.
  6. When PR is approved, it will be squashed & merged, intodevelop and later merged intorelease/{No} for deployment.

About

Docker environment required to run Symfony (based on official php and mysql docker hub repositories)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP55.1%
  • Dockerfile18.4%
  • Makefile18.3%
  • Smarty4.7%
  • Shell1.7%
  • HTML1.4%
  • TSQL0.4%

[8]ページ先頭

©2009-2025 Movatter.jp