Files
outline-sync/Dockerfile
2026-03-07 20:54:59 +01:00

35 lines
999 B
Docker

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"]