Files
web-crm.mcmed.ru/backend/doc/setup-local.md
Viktoria Polyakova 4fb101c5db Init
2026-01-25 08:57:38 +00:00

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 ./dumps directory
  • 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    

Setup node debug

Настройка node debug

Send test request to test.rifeberry.loc/api

Optional: Setup wildcard subdomains using dnsmasq

https://askubuntu.com/questions/1029882/how-can-i-set-up-local-wildcard-127-0-0-1-domain-resolution-on-18-04-20-04