feat: initialize poster studio web service
Verify and deploy poster studio service / verify-deploy (push) Has been cancelled
Verify and deploy poster studio service / verify-deploy (push) Has been cancelled
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
FROM python:3.12-slim-bookworm AS base
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml ./
|
||||
COPY src ./src
|
||||
FROM base AS test
|
||||
RUN pip install . pytest ruff
|
||||
COPY tests ./tests
|
||||
RUN ruff check src tests && pytest -q
|
||||
FROM base AS runtime
|
||||
RUN pip install . && addgroup --system app && adduser --system --ingroup app app && mkdir -p /data/assets && chown -R app:app /data
|
||||
USER app
|
||||
EXPOSE 8000
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=15s --retries=6 CMD ["python","-c","import urllib.request;urllib.request.urlopen('http://127.0.0.1:8000/health',timeout=2)"]
|
||||
CMD ["uvicorn","poster_studio.main:app","--host","0.0.0.0","--port","8000"]
|
||||
Reference in New Issue
Block a user