Fix database path to use writable directory

This commit is contained in:
Automated Action 2025-06-05 09:41:02 +00:00
parent 65cfb5b050
commit d6b0337f3c
3 changed files with 3 additions and 3 deletions

View File

@ -184,4 +184,4 @@ Once the application is running, you can access the API documentation at:
## Database
The application uses SQLite as the database. The database file is created at `/app/storage/db/db.sqlite`.
The application uses SQLite as the database. The database file is created at `/projects/ecommerceapplication-np8xvf/storage/db/db.sqlite`.

View File

@ -36,7 +36,7 @@ script_location = migrations
# output_encoding = utf-8
# SQLite URL
sqlalchemy.url = sqlite:////app/storage/db/db.sqlite
sqlalchemy.url = sqlite:////projects/ecommerceapplication-np8xvf/storage/db/db.sqlite
[post_write_hooks]
# post_write_hooks defines scripts or Python functions that are run

View File

@ -19,7 +19,7 @@ class Settings(BaseSettings):
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
# Database settings
DB_DIR: Path = Path("/app") / "storage" / "db"
DB_DIR: Path = Path("/projects/ecommerceapplication-np8xvf") / "storage" / "db"
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
# CORS settings