Skip to content

Commit 0587200

Browse files
committed
fix(backend): create photos directory before static mount
1 parent e2989aa commit 0587200

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

whereisit/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ COPY frontend/package.json frontend/package-lock.json ./
66
RUN npm ci
77

88
# Force cache invalidation for source code
9-
ARG CACHEBUST=202602201940
9+
ARG CACHEBUST=202602201955
1010
RUN echo "Cache bust: $CACHEBUST"
1111

1212
COPY frontend/ ./

whereisit/app/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ async def startup():
4747
except Exception as e:
4848
logger.error(f"Error listing directories: {e}")
4949

50-
# Ensure photos directory exists
51-
os.makedirs("/data/photos", exist_ok=True)
52-
5350
async with engine.begin() as conn:
5451
await conn.run_sync(Base.metadata.create_all)
5552

@@ -83,6 +80,7 @@ async def health_check():
8380
logger.warning("frontend/dist/assets NOT FOUND")
8481

8582
# Mount photos directory
83+
os.makedirs("/data/photos", exist_ok=True)
8684
app.mount("/api/photos", StaticFiles(directory="/data/photos"), name="photos")
8785

8886
# Catch-all to serve index.html for SPA (excluding API)

whereisit/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "WhereIsIt"
2-
version: "0.4.16"
2+
version: "0.4.17"
33
slug: "whereisit"
44
description: "Physical storage management for Home Assistant"
55
url: "https://github.com/D3L05/whereisit"

0 commit comments

Comments
 (0)