https://github.com/florianrusch/docker-nginx-php-symfony
🐳 This Docker Compose repository initializes a Docker container system for Symfony projects with nginx, php-fpm, mysql and a phpmyadmin container.
https://github.com/florianrusch/docker-nginx-php-symfony
docker docker-compose mysql nginx php symfony
Last synced: 2 months ago
JSON representation
🐳 This Docker Compose repository initializes a Docker container system for Symfony projects with nginx, php-fpm, mysql and a phpmyadmin container.
- Host: GitHub
- URL: https://github.com/florianrusch/docker-nginx-php-symfony
- Owner: florianrusch
- License: mit
- Created: 2017-07-02T10:37:12.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-02T15:15:55.000Z (almost 9 years ago)
- Last Synced: 2025-04-15T18:50:40.904Z (about 1 year ago)
- Topics: docker, docker-compose, mysql, nginx, php, symfony
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🐳 Docker Compose - nginx-php-symfony
This Docker-Compose repository initializes a Docker container system with `nginx`, `php`, `db` (MySQL) and a `pma` (phpmyadmin) container.
The intention behind this project is to have a Docker container system which helps me and you to start easily developing a Symfony project.
## Setup
### File hierarchie
- `Docker-compose.yml` - Definition of the container system.
- `.env` - Defines and configures the env variables for the container system. Has to be created from the `.env-dist` file.
- `.env-dist` - Template file for the `.env` file.
- `.data/` - Data folder for the MySQL database etc.
- `images/` - Folder for the images of the `php` and the `nginx` container.
- `logs/` - Logging folder for Nginx and Symfony.
- `symfony/` - Folder with the source code of the Symfony project.
### New project
There is not much what you have to do. Just copy the three files `Docker-compose.yml`, `.gitignore`, `.env-dist` to your project root. Create an `.env` file from the `.env-dist` and update the constants in them. After that you should register the ip addresses of the Nginx and the phpmyadmin container on your loopback devices.
For MacOS you can run the following command on your terminal (please replace x.x.x.x with the specific ip address):
```
sudo ifconfig lo0 alias x.x.x.x
```
> If you like to use a domain name/hostname to access your container, you have to register them in your `/etc/hosts` file. Normally you need sudo rights to edit this file.
### Existing project
If you have an existing project you need to put your Symfony code into a separated folder called `symfony`. (See [File hierarchie](#file-hierarchie))
# Thank you! 👏
There were a view projects/people which I like to say thank you for their work:
- [maxpou](https://github.com/maxpou) with his [docker-symfony repo](https://github.com/maxpou/docker-symfony).
- [eko](https://github.com/eko) with his [docker-symfony repo](https://github.com/eko/docker-symfony).
- Chris, a good friend and flatmate.