Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Init margin project #565

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions margin_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,29 @@ Rename ```example.env``` to ```.env``` with this command: ```mv .env.example .en
docker compose up
```

#### Also you need to create database and tables. You have 3 variants:
#### Also you need to create database and tables. You have 2 variants:

1) Use alembic


**Note: While this app is in beta, you first need to navigate to the `margin_app` folder.**
```bash
alembic upgrade head
cd margin_app
```

2) Use postgres dumps **(if you create it before)**

And then:
```bash
./scripts/postgres/restore.sh
alembic upgrade head
```

After that write name of this dump
2) Any other script you have

3) Any other script you have
#### To create a new migration:
1) Ensure Docker Compose is running.
2) Run the following script to create the migration:
```bash
./scripts/alembic/create_migration.sh
```
3) Choose a name for the migration.

### 4. Link to API

Expand Down
3 changes: 3 additions & 0 deletions margin_app/app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from fastapi import FastAPI

app = FastAPI()
Loading