v1.6.0: Docker, docker-compose, Forgejo CI/CD и откат по тегу
- Dockerfile + entrypoint (alembic + uvicorn), compose с healthcheck - .gitea/workflows: ci (pytest), deploy (SSH + compose по тегу v*) - docs/CICD.md: секреты, pvestandt9, ручной откат через workflow_dispatch Made-with: Cursor
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends libpq5 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY pyproject.toml README.md alembic.ini ./
|
||||
COPY alembic ./alembic
|
||||
COPY onguard24 ./onguard24
|
||||
COPY deploy/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh \
|
||||
&& pip install --no-cache-dir --upgrade pip \
|
||||
&& pip install --no-cache-dir .
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user