mirror of
https://github.com/sstent/foodplanner.git
synced 2026-04-06 13:03:58 +00:00
sync - added week menus
This commit is contained in:
@@ -52,12 +52,6 @@ job "foodplanner" {
|
|||||||
config {
|
config {
|
||||||
image = "ghcr.io/sstent/foodplanner:main"
|
image = "ghcr.io/sstent/foodplanner:main"
|
||||||
ports = ["http"]
|
ports = ["http"]
|
||||||
|
|
||||||
# Mount the SQLite database file to persist data
|
|
||||||
# Adjust the source path as needed for your environment
|
|
||||||
volumes = [
|
|
||||||
"/alloc/tmp/meal_planner.db:/app/meal_planner.db"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resources {
|
resources {
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -18,7 +18,7 @@ import requests
|
|||||||
from fastapi import File, UploadFile
|
from fastapi import File, UploadFile
|
||||||
|
|
||||||
# Database setup - Use SQLite for easier setup
|
# Database setup - Use SQLite for easier setup
|
||||||
DATABASE_URL = "sqlite:///./meal_planner.db"
|
DATABASE_URL = "sqlite:///data/meal_planner.db"
|
||||||
# For production, use PostgreSQL: DATABASE_URL = "postgresql://username:password@localhost/meal_planner"
|
# For production, use PostgreSQL: DATABASE_URL = "postgresql://username:password@localhost/meal_planner"
|
||||||
|
|
||||||
engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False} if "sqlite" in DATABASE_URL else {})
|
engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False} if "sqlite" in DATABASE_URL else {})
|
||||||
|
|||||||
Reference in New Issue
Block a user