- Docker
- Run
docker compose up -d
- Run
docker compose exec biblioteca composer install
- Run
docker compose exec biblioteca npm install
- Run
docker compose exec biblioteca npm run build
- Run
docker compose exec biblioteca bin/console doctrine:schema:create
- Run
docker compose exec biblioteca bin/console app:create-admin-user <username> <password>
- Run
docker compose exec biblioteca php bin/console typesense:create
- Run
docker compose exec biblioteca php bin/console typesense:import
- Push your books to the
public/books
folder - Run
docker compose exec biblioteca php bin/console books:scan
- Go to
http://localhost:48480
orhttps://biblioteca.docker.test
if you have configured the hosts file and traefik
- 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