fix docker compose
This commit is contained in:
@@ -23,7 +23,7 @@ services:
|
|||||||
expose:
|
expose:
|
||||||
- "5001"
|
- "5001"
|
||||||
networks:
|
networks:
|
||||||
- reverse-proxy_default
|
- reverse-proxy
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-fsS", "http://localhost:5001/healthz"]
|
test: ["CMD", "curl", "-fsS", "http://localhost:5001/healthz"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -54,7 +54,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- solardb-api
|
- solardb-api
|
||||||
networks:
|
networks:
|
||||||
- reverse-proxy_default
|
- reverse-proxy
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-fsS", "http://localhost:5000/"]
|
test: ["CMD", "curl", "-fsS", "http://localhost:5000/"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -66,5 +66,5 @@ volumes:
|
|||||||
solardb_uploads:
|
solardb_uploads:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
reverse-proxy_default:
|
reverse-proxy:
|
||||||
external: true
|
external: true
|
||||||
@@ -2,11 +2,13 @@ from flask import Flask, request, jsonify
|
|||||||
from tinydb import TinyDB, Query, where
|
from tinydb import TinyDB, Query, where
|
||||||
from tinydb.operations import set as ops_set
|
from tinydb.operations import set as ops_set
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
# Single TinyDB file for now (can be swapped to per-table later)
|
# Single TinyDB file for now (can be swapped to per-table later)
|
||||||
db = TinyDB("db.json")
|
DB_PATH = os.getenv("DB_PATH", "db.json")
|
||||||
|
db = TinyDB(DB_PATH)
|
||||||
|
|
||||||
# --- Helpers -----------------------------------------------------------------
|
# --- Helpers -----------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user