A sample PHP application powered by API Platform & Symfony
- Docker
- Run database
- Backend (REST API, Docs)
- Frontend (Website, Admin)
docker-compose build --pull --no-cache
docker-compose up -d
docker-compose build --pull --no-cache
docker-compose up -d
Open new terminal and switch to api
folder:
$ cd api
Edit .env
file - update connection string to what you want.
$ composer install
This will create all necessary tables in DB:
$ php bin/console doctrine:migrations:migrate
This will fetch all books from remote JSON file and populate DB
php bin/console app:parse
This is important that you run Symfony server, rather than PHP built-in. The lattest doesn't produce proper JSON-LD file thus frontend doesn't work.
symfony serve
Open terminal and switch to pwa
folder:
$ cd pwa
Edit pwa\pages\admin\index.tsx
. Set this to point to your backend with port:
return <HydraAdmin entrypoint="http://localhost:8000" />;
yarn install
yarn dev