A symfony5 sample project using symfony dev docker
git clone https://github.com/readymadehost/symfony-dev-docker.git symfony-sample-docker
cd symfony-sample-docker
git clone https://github.com/readymadehost/symfony-dev-docker-sample.git project
cp project/symfony-dev-docker/.env .env
and review.env
filedocker-compose build
docker-compose up -d
docker-compose exec cli bash
composer install
to install php packagesmpp
to manage project permissionbin/console doctrine:migrations:migrate
to migrate database tablesbin/console doctrine:fixtures:load
load example databin/console cache:clear
bin/console --env=test doctrine:database:drop --force
to drop project_test database if existbin/console --env=test doctrine:database:create
to create fresh test databasebin/console --env=test doctrine:migrations:migrate
bin/console --env=test doctrine:fixtures:load
bin/phpunit
to run tests
Symfony dev docker has database, extensions and everything needed to work with unit tests and function tests. Github actions are configured for sample project, check https://github.com/readymadehost/symfony-dev-docker-sample/blob/master/.github/workflows/tests.yml
Create an issue if you have any questions.