A project template in the following configuration:
/app
and /docker
folders, respectively.
This allows you to separate the symphony-application and docker environment variables, and to implement the mono
repository pattern by adding new folders if necessary: /centrifugo
, s3-storage
, etc.compose.override.yaml
is ignored by default, so you can add your own settings without worrying about overwriting the original ones.One-liner to create a new project: composer create-project ddlzz/symfony-docker-website-skeleton local_project_path && make setup-configs && make init OPTIONS="webapp" && make up
Split into steps:
composer create-project ddlzz/symfony-docker-website-skeleton local_project_path
make setup-configs
- create .env files for docker containersmake init OPTIONS="webapp"
- very important! Run it before making any commits to your repo. You can omit the OPTIONS
parameter if you don't need to use the webapp.make up
- start docker containers Default ports are random (47001-47999) for every created project, so click the link generated in CLI with the output of make up
command and enjoy!
You also can set desired ports for Nginx and PostgreSQL manually in generated /.env file (don't forget to run make restart
afterwards).
When running make init, you can use these flags:
OPTIONS="webapp"
: Includes web application features. Omit for the basic symfony/skeleton
setup.VERSION=X.Y
: Specifies Symfony version. Defaults to the latest stable version, which is 6.4 at the moment.Examples:
make init OPTIONS="webapp"
make init VERSION=7.2
make init OPTIONS="webapp" VERSION=7.2
To integrate Xdebug with PhpStorm within a created project you need to do the following:
Settings -> Languages & Frameworks -> PHP
tab from the php-fpm container in the project; make sure that Xdebug works properly in the container.9009
at the menu Settings -> Languages & Frameworks -> PHP -> Debug -> Xdebug -> Debug
.Docker
in the menu Settings -> Languages & Frameworks -> PHP -> Servers
(it matches with the value of the ServerName
field in the IDE config for both interpreters).Settings -> Languages & Frameworks -> PHP -> Path Mappings
,Listen for PHP debug connections
; if you have any questions, please read the documentation.