Unit Tests / test (push) Successful in 3s
## Summary - Dockerize SCHA Wheaton (uv packaging, Dockerfile, compose, entrypoint) and move secrets/DB config to env-driven `scha/settings/`. - Add Gitea Actions: unit tests on push/PR to `master`, auto-deploy on green master push via `server-infra/scripts/deploy.sh --app scha --env prod`. - Prod compose uses shared external Postgres only (no bundled DB); control-node secret template at `.env.prod.example`. Closes #19 (Part A). Depends on companion server-infra PR for catalog/host_apps registration. ## Test plan - [ ] `uv sync --frozen` + `DJANGO_ENV=dev DJANGO_SECRET_KEY=test uv run python manage.py check` - [ ] `docker compose build` succeeds locally - [ ] `docker compose up` serves app against bundled Postgres - [ ] `./scripts/validate-env.sh ~/Documents/secrets/scha/scha_prod.env` passes - [ ] After merge + server-infra catalog live: push to master runs Unit Tests then Deploy Reviewed-on: #21
29 lines
607 B
Docker
29 lines
607 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
UV_COMPILE_BYTECODE=1 \
|
|
UV_LINK_MODE=copy \
|
|
UV_PROJECT_ENVIRONMENT=/app/.venv
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends libpq5 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
|
|
COPY pyproject.toml uv.lock ./
|
|
RUN uv sync --frozen --no-dev
|
|
|
|
COPY scha ./scha
|
|
COPY schasite ./schasite
|
|
COPY manage.py ./
|
|
COPY scripts/docker-entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|