containerize all the project
This commit is contained in:
1 parent
6c5bc375da
commit
87f9cbb863
4 files changed
+35
-18
No files matched your search
@@ -2,11 +2,8 @@ import os
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker, declarative_base
|
||||
|
||||
DB_DIR = os.getenv("DATA_DIR", os.path.abspath("../../data"))
|
||||
os.makedirs(DB_DIR, exist_ok=True)
|
||||
|
||||
DB_PATH = os.path.join(DB_DIR, "portfolio.db")
|
||||
SQLALCHEMY_DATABASE_URL = f"sqlite:///{DB_PATH}"
|
||||
DATA_DIR = os.getenv("DATA_DIR", "../../data")
|
||||
SQLALCHEMY_DATABASE_URL = f"sqlite:///{DATA_DIR}/portfolio.db"
|
||||
|
||||
engine = create_engine(
|
||||
SQLALCHEMY_DATABASE_URL,
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
backend:
|
||||
build: ../..
|
||||
container_name: portfolio-backend
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- .:/app
|
||||
Reference in new issue
Block a user