Fix database path to use writable directory
This commit is contained in:
parent
d6b0337f3c
commit
48211efed3
@ -184,4 +184,4 @@ Once the application is running, you can access the API documentation at:
|
|||||||
|
|
||||||
## Database
|
## Database
|
||||||
|
|
||||||
The application uses SQLite as the database. The database file is created at `/projects/ecommerceapplication-np8xvf/storage/db/db.sqlite`.
|
The application uses SQLite as the database. The database file is created at `/app/storage/db/db.sqlite`.
|
@ -36,7 +36,7 @@ script_location = migrations
|
|||||||
# output_encoding = utf-8
|
# output_encoding = utf-8
|
||||||
|
|
||||||
# SQLite URL
|
# SQLite URL
|
||||||
sqlalchemy.url = sqlite:////projects/ecommerceapplication-np8xvf/storage/db/db.sqlite
|
sqlalchemy.url = sqlite:////app/storage/db/db.sqlite
|
||||||
|
|
||||||
[post_write_hooks]
|
[post_write_hooks]
|
||||||
# post_write_hooks defines scripts or Python functions that are run
|
# post_write_hooks defines scripts or Python functions that are run
|
||||||
|
@ -19,7 +19,7 @@ class Settings(BaseSettings):
|
|||||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||||
|
|
||||||
# Database settings
|
# Database settings
|
||||||
DB_DIR: Path = Path("/projects/ecommerceapplication-np8xvf") / "storage" / "db"
|
DB_DIR: Path = Path("/app") / "storage" / "db"
|
||||||
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
|
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
|
||||||
|
|
||||||
# CORS settings
|
# CORS settings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user