build: package local admin service

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bastian Wagner
2026-08-15 09:56:50 +02:00
parent d2ac079870
commit 5931a57f82
3 changed files with 26 additions and 0 deletions

7
.env.example Normal file
View File

@@ -0,0 +1,7 @@
# .env.example
ADMIN_PASSWORD=change-me
SECRET_KEY=replace-with-at-least-16-random-characters
CREDENTIAL_ENCRYPTION_KEY=replace-with-a-valid-fernet-key
SYNC_INTERVAL_MINUTES=5
DATA_DIR=/data
DATABASE_URL=sqlite:////data/app.db

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
# Dockerfile
FROM python:3.12-slim
WORKDIR /app
COPY pyproject.toml /app/
RUN pip install --no-cache-dir .
COPY app /app/app
RUN mkdir -p /data && chmod 700 /data
ENV DATA_DIR=/data
EXPOSE 8080
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]

View File

@@ -0,0 +1,9 @@
services:
sync:
build: .
env_file: .env
ports:
- "8080:8080"
volumes:
- ./data:/data
restart: unless-stopped