Add sync engine, web UI, Docker setup, and tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install -y -q --no-install-recommends git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install --no-cache-dir requests fastapi "uvicorn[standard]" pydantic
|
||||
|
||||
ENV GIT_AUTHOR_NAME=outline-sync \
|
||||
GIT_AUTHOR_EMAIL=sync@local \
|
||||
GIT_COMMITTER_NAME=outline-sync \
|
||||
GIT_COMMITTER_EMAIL=sync@local \
|
||||
VAULT_DIR=/vault \
|
||||
SETTINGS_PATH=/work/settings.json
|
||||
|
||||
RUN git config --global user.email "sync@local" && \
|
||||
git config --global user.name "outline-sync"
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
COPY outline_sync.py webui.py settings.json ./
|
||||
|
||||
# Initialise vault with both branches needed by outline_sync.py
|
||||
RUN git init /vault && \
|
||||
git -C /vault checkout -b main && \
|
||||
touch /vault/.gitkeep && \
|
||||
git -C /vault add .gitkeep && \
|
||||
git -C /vault commit -m "init: empty vault" && \
|
||||
git -C /vault checkout -b outline && \
|
||||
git -C /vault checkout main
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["uvicorn", "webui:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
Reference in New Issue
Block a user