Tools site: Markdown editor, JSON editor, 24-hour pastebin
Single FastAPI container with a registry-driven single-page front end, so new tools are one module plus one registry entry. Runs as one container behind a reverse proxy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
9d910eb147
26 changed files with 2591 additions and 0 deletions
12
app/Dockerfile
Normal file
12
app/Dockerfile
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
FROM python:3.12-slim
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY main.py ./
|
||||
COPY tools ./tools
|
||||
COPY static ./static
|
||||
RUN useradd --system --uid 10001 tools && mkdir -p /data && chown tools /data
|
||||
USER tools
|
||||
ENV DATA_DIR=/data PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
||||
# HOST/PORT come from compose; uvicorn trusts X-Forwarded-* only from loopback (the local proxy/tunnel).
|
||||
CMD ["sh", "-c", "exec uvicorn main:app --host ${HOST:-127.0.0.1} --port ${PORT:-8090} --proxy-headers --forwarded-allow-ips 127.0.0.1 --no-server-header"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue