Update README with database path information
Added information about the storage directory and updated installation instructions with database setup steps. generated with BackendIM... (backend.im)
This commit is contained in:
parent
fb53d13646
commit
6c620c328d
18
README.md
18
README.md
@ -24,6 +24,8 @@ A FastAPI-based service for user authentication and management.
|
|||||||
│ ├── database.py # Database connection setup
|
│ ├── database.py # Database connection setup
|
||||||
│ ├── models.py # SQLAlchemy models
|
│ ├── models.py # SQLAlchemy models
|
||||||
│ └── schemas.py # Pydantic schemas
|
│ └── schemas.py # Pydantic schemas
|
||||||
|
├── storage/ # Storage directory
|
||||||
|
│ └── db/ # Database files
|
||||||
├── alembic.ini # Alembic configuration
|
├── alembic.ini # Alembic configuration
|
||||||
├── main.py # Application entry point
|
├── main.py # Application entry point
|
||||||
└── requirements.txt # Project dependencies
|
└── requirements.txt # Project dependencies
|
||||||
@ -55,17 +57,29 @@ A FastAPI-based service for user authentication and management.
|
|||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run the application:
|
3. Make sure the storage directory exists:
|
||||||
|
```
|
||||||
|
mkdir -p storage/db
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Run the database migrations:
|
||||||
|
```
|
||||||
|
alembic upgrade head
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Run the application:
|
||||||
```
|
```
|
||||||
uvicorn main:app --reload
|
uvicorn main:app --reload
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Access the API documentation at `http://localhost:8000/docs`
|
6. Access the API documentation at `http://localhost:8000/docs`
|
||||||
|
|
||||||
## Database
|
## Database
|
||||||
|
|
||||||
The application uses SQLite as the database with SQLAlchemy ORM. Database migrations are managed with Alembic.
|
The application uses SQLite as the database with SQLAlchemy ORM. Database migrations are managed with Alembic.
|
||||||
|
|
||||||
|
The database file is stored in the `storage/db` directory at the project root. This path is configured in `app/database.py` and `alembic/env.py`.
|
||||||
|
|
||||||
### Creating a Migration
|
### Creating a Migration
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user