change the container to be more production ready
This includes the code files in the docker image and creates a separate data dir, which means we don't need to manually mount files into the container anymore.
This commit is contained in:
parent
24aabd43f2
commit
af25d9c5a2
3 changed files with 12 additions and 3 deletions
|
|
@ -3,10 +3,12 @@ from pathlib import Path
|
|||
|
||||
import toml
|
||||
|
||||
cachedir = (
|
||||
Path(cachedir) if (cachedir := os.getenv("UNWIND_CACHEDIR", "./.cache")) else None
|
||||
)
|
||||
datadir = Path(os.getenv("UNWIND_DATA") or "./data")
|
||||
cachedir = (
|
||||
Path(cachedir)
|
||||
if (cachedir := os.getenv("UNWIND_CACHEDIR", datadir / ".cache"))
|
||||
else None
|
||||
)
|
||||
debug = os.getenv("DEBUG") == "1"
|
||||
loglevel = os.getenv("UNWIND_LOGLEVEL") or ("DEBUG" if debug else "INFO")
|
||||
storage_path = os.getenv("UNWIND_STORAGE", datadir / "db.sqlite")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue