- Docker and docker compose installed
- Ddev https://ddev.com/
- Clone the repository
cd
to your local directory where you cloned the repository- Run
ddev start
- Run
ddev composer install
- Run
ddev exec bin/console doctrine:database:create
- Run
ddev exec bin/console doctrine:migration:sync-metadata-storage
- Run
ddev exec bin/console doctrine:migration:migrate
- Run
ddev exec bin/console typesense:create
- Run
ddev exec bin/console app:create-admin-user <username> <password>
- Run
ddev exec npm i
- Run
ddev exec npm run build
- Run
ddev launch
Run ddev xdebug
- Copy the docker-compose.yml file to your project directory
- Copy the Dockerfile
- run
docker-compose up -d
- run
docker-compose exec php composer install
- run
docker-compose exec php bin/console doctrine:schema:create
- run
docker-compose exec php bin/console typesense:create
- run
docker-compose exec php bin/console app:create-admin-user <username> <password>
- run
docker-compose exec npm i
- run
docker-compose exec npm run build
- open your browser on
http://localhost:48480
- Create a
docker-compose-overrides.yml
file with the following content:
services:
biblioteca:
build:
target: debug
environment:
- XDEBUG_MODE=debug
- PHP_IDE_CONFIG=serverName=biblioteca.docker.test
- Make sure your container is up-to-date with
docker compose up -d --build --force-recreate
- Create a new server in your IDE with the following settings:
- Host:
biblioteca.docker.test
- Mapping: =>
/var/www/html
- Host:
- Be sure that you are listening to the Xdebug port in your IDE
- Set a breakpoint in your code
- Start debugging.
Note: On command line, you can debug with this:
docker-compose exec -e XDEBUG_MODE=debug -e XDEBUG_TRIGGER=1 biblioteca ./vendor/bin/phpunit
With liip/pontsun
- Copy the docker-compose-pontsun.yml file to your project directory
- ... Follow steps 2 to 9 from the docker compose installation
- open your browser on
http://biblioteca.docker.test
You can use dockge and setup a stack. Use the same docker-compose procedure as before.