Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkurc1/docker-symfony
Complete Docker stack for developing Symfony application.
https://github.com/mkurc1/docker-symfony
docker docker-compose docker-symfony mysql nginx php7 symfony symfony-docker
Last synced: 8 days ago
JSON representation
Complete Docker stack for developing Symfony application.
- Host: GitHub
- URL: https://github.com/mkurc1/docker-symfony
- Owner: mkurc1
- License: mit
- Created: 2017-05-24T19:16:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-23T23:30:44.000Z (over 5 years ago)
- Last Synced: 2024-03-01T20:34:22.258Z (9 months ago)
- Topics: docker, docker-compose, docker-symfony, mysql, nginx, php7, symfony, symfony-docker
- Language: Dockerfile
- Homepage: https://bitapp.pl
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Symfony 4 (PHP7.2-FPM - NGINX - MySQL)
Simple docker configuration for Symfony 4 applications. This stack run with docker and docker-compose (1.7 or higher).
## Configure
1. Create a `.env` from the `.env.dist` file and update it into your configurations.
2. Build and run containers
```
$ docker-compose build
$ docker-compose up -d
```If you use Mac OS, you should use this commands:
```
$ docker-compose -f docker-compose.yml -f docker-compose.mac.yml build
$ docker-compose -f docker-compose.yml -f docker-compose.mac.yml up -d
```It's definitely improve performance on Mac OS.
3. Update database configuration in `.env` file:
```
DATABASE_URL=mysql://db_user:db_password@mysql:3306/db_name
```Your database hostname during work with docker is `mysql` instead of e.g `localhost`.
4. Composer install and create database
```
$ docker-compose exec php sh
composer install
php bin/console doctrine:database:create
php bin/console doctrine:schema:update -f
```Or, if you want to use aliases:
```
$ docker-compose exec php sh -l
c install
sf doctrine:database:create
sf doctrine:schema:update -f
```5. Visit http://localhost and enjoy the effects.
## License
The bundle is released under the [MIT License](LICENSE).