1.2 KiB
1.2 KiB
Setup local development environment
Start docker services
docker-compose up -d
Setup database
- Add new postgres connection in PHP Storm
If you have different psql version on your host, you can manually restore dump inside container:
- Put dump to
./dumpsdirectory - Connect to postgres container
- Restore database:
psql -h localhost --set ON_ERROR_STOP=on -U root -d rifeberry -1 -f /dumps/rifeberry.sql
Connect to node service and run other commands inside container
docker exec -it nest-backend_node_1 sh
Install packages
yarn
Generate JWT keys if not exists
openssl rsa -pubout -in var/jwt/private.pem -out var/jwt/public.pem
Migrate database
yarn typeorm:run-migrations
Add host to /etc/hosts
127.0.0.1 test.rifeberry.loc