- in host console, execute:
docker-compose up
- in host console, execute:
docker-compose exec php-fpm bash
- in the container console:
composer install
- create db tables
php bin/console doctrine:schema:update --force
- connect from mysqladmin docker to docker mysql:
http://localhost:8001/
server: mysql
user:root
pwd:docker_root
- Create example data execute SQL script in
db/2-data.sql
- install php 7
- install mysql and a mysql client
- run
compose install
- connect to mysql database
-
Only if working with local database
- create user
user:sample_user pwd:sample_pw
-
create database sample
-
execute scripts
- db/1-init.sql
- db/2-data.sql
-
grant user sample_user to manage sample
-
log in docker php-fpm and execute
php bin/console doctrine:schema:update --force
https://jsonapi.org/
from: https://medium.com/@joeymasip/how-to-create-an-api-with-symfony-4-and-jwt-b2334a8fbec2