sync
This commit is contained in:
parent
48f640b55d
commit
440a2fa01f
28 changed files with 1849 additions and 96 deletions
69
00-work/onboarding.md
Normal file
69
00-work/onboarding.md
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
Скопировал .env из .env.example
|
||||
|
||||
выставил таким
|
||||
API_CORS="http://localhost:3000,http://localhost:8000"
|
||||
|
||||
оставил каким есть:
|
||||
DATABASE_URL="postgres://root:root@localhost/trails_db?sslmode=disable"
|
||||
POSTGRES_USER="root"
|
||||
POSTGRES_PASSWORD="root"
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_DB="trails_db"
|
||||
CLIENT_JWT_MAXAGE=60 # hours
|
||||
ADMIN_JWT_MAXAGE=60 # hours
|
||||
STORAGE_DOMAIN="https://static.thetrails.app"
|
||||
STORAGE_FOLDER="./storage"
|
||||
|
||||
API_KEY
|
||||
добавил туда чаще вывод из таких команд
|
||||
|
||||
openssl rand -base64 32
|
||||
openssl rand -hex 32
|
||||
|
||||
PGADMIN_DEFAULT_EMAIL
|
||||
PGADMIN_DEFAULT_PASSWORD
|
||||
рандомный email, password
|
||||
|
||||
storage оставил таким какой он есть
|
||||
|
||||
# Поднимаем бд
|
||||
```bash
|
||||
docker compose up -d
|
||||
|
||||
docker compose ps # проверяем логи
|
||||
|
||||
docker compose logs -f postgres # тоже логи но бд
|
||||
|
||||
docker exec -it trails_postgres psql -U root -d trails_db # тестим бд
|
||||
```
|
||||
|
||||
# Миграции:
|
||||
|
||||
```bash
|
||||
cargo run --bin migrate -- up
|
||||
|
||||
cargo run --bin migrate -- status
|
||||
```
|
||||
|
||||
# storage
|
||||
|
||||
```
|
||||
mkdir -p ./storage
|
||||
```
|
||||
|
||||
# cargo run
|
||||
|
||||
```bash
|
||||
cargo run --bin client
|
||||
|
||||
```
|
||||
|
||||
# hurl tests
|
||||
|
||||
```bash
|
||||
# поднимаем контейнер
|
||||
docker run --rm ghcr.io/orange-opensource/hurl:latest --version
|
||||
|
||||
hurl --test examples/
|
||||
```
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue