feat: Add support for DATABASE in dockerfile volume
All checks were successful
Build Docker / BuildImage (push) Successful in 39s
Check Code Quality / RuffCheck (push) Successful in 49s

This commit is contained in:
2025-11-21 13:13:35 +11:00
parent 1c51e97354
commit b6662f400a
2 changed files with 3 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
# Add mount point for data volume
ENV BASE_DIR=/data
ENV DATABASE_PATH=/data/fireexplorer.db
VOLUME /data
EXPOSE 5000

View File

@@ -18,7 +18,8 @@ from tools import hip2, wallet_txt
dotenv.load_dotenv()
app = Flask(__name__)
DATABASE = "fireexplorer.db"
DATABASE = os.getenv("DATABASE_PATH", "fireexplorer.db")
def get_db():