Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/khouloudhaddad/dockerized-symfony-env

Set-up dockerized env for Symfony
https://github.com/khouloudhaddad/dockerized-symfony-env

docker docker-compose hosts nginx-docker php8 postgresql-database symfony xdebug

Last synced: 5 days ago
JSON representation

Set-up dockerized env for Symfony

Awesome Lists containing this project

README

        

# Dockerize Symfony App

## Prepare dev environment

- Create config files
- Edit hosts file to register new domain
- Run `docker-compose up -d`

## Install Symfony Skeleton

- Run `docker-compose exec php composer create-project symfony/skeleton:"5.*"`
- Run `docker-compose exec php composer require symfony/orm-pack`
- Run `docker-compose exec php composer require symfony/orm-pack`, choose "No" then update DATABASE_URL in .env file

## Create Postgres DB and entities

- Run `docker-compose exec php bin/console doctrine:schema:update --force`

## PHPUnit
- Run `docker-compose exec php composer require phpunit/phpunit`
- Run `docker-compose exec php composer require --dev symfony/phpunit-bridge`
- Create test DB through `docker-compose exec php bin/console doctrine:database:create --env=test`
- Run `docker-compose exec php bin/console doctrine:schema:update --force --env=test`