build: package local admin service
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
7
.env.example
Normal file
7
.env.example
Normal 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
10
Dockerfile
Normal 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"]
|
||||
9
docker-compose.example.yml
Normal file
9
docker-compose.example.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
sync:
|
||||
build: .
|
||||
env_file: .env
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user