Simple Docker setup for Symfony 3+ with PHP 7.1, Apache2 and MySQL.
Run this project by starting docker with compose:
docker-compose up -d
Login with this little helper script from within the project dir
(just for convenience, docker exec
will too):
./bin/dexec
You can also login by using plain old SSH:
# Please refer to "Security" section for password informations!
ssh -p 2222 web@localhost
- Go to the
Deployment
settings for this project and add anSFTP
deployment
- Enter connection informations:
- Configure project paths mappings:
- Configure exclude paths mappgins:
- Set proper deploy and sync options
- SSH is mapped to
2121
and2222
- MySQL is mapped to
33060
- Apache is mapped to
8080
MySQL
Please refere to the environment variables set within the docker-compose.yml
-file.
Webserver
By default the password for the webserver user (web
) is also web
.
If you like to change the password, just pass the WEBSERVER_PASSWORD
-environment variable with your desired password to the container within
your docker-compose.yml
-file:
services:
// ...
php:
// ...
environment:
- WEBSERVER_PASSWORD=S3cureP4s5
Keep in mind that you have to use this password for your PHPStorm deployment too!