Skip to content

Commit 932edc9

Browse files
committed
refactor: improve encryption robustness and container security standards
1 parent 9f059e7 commit 932edc9

5 files changed

Lines changed: 1871 additions & 4 deletions

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ FROM python:3.12-slim
22

33
WORKDIR /app
44

5+
# Create a non-root user and ensure data directory exists
6+
RUN useradd -m -u 1000 edb && mkdir -p /data && chown edb:edb /data
7+
58
COPY pyproject.toml .
69
COPY src/ src/
710

@@ -13,6 +16,7 @@ ENV EDB_DB_PATH=/data/edb.db
1316
ENV EDB_API_HOST=0.0.0.0
1417
ENV EDB_API_PORT=8000
1518

19+
USER edb
1620
VOLUME /data
1721

1822
CMD ["edb", "serve"]

0 commit comments

Comments
 (0)