feat: rebuild work queue api with fastapi and postgres
Some checks failed
ci / build-test-push (push) Failing after 1m42s

This commit is contained in:
Steve W
2026-04-11 19:24:52 +00:00
parent 7420adb7aa
commit fbc88bb62b
33 changed files with 1707 additions and 1132 deletions

View File

@@ -1,15 +1,12 @@
FROM golang:1.24 AS build
FROM python:3.12-slim
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /out/work-queue-api ./cmd/work-queue-api
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /out/work-queue-api /usr/local/bin/work-queue-api
RUN apt-get update && apt-get install -y --no-install-recommends curl wget ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:0.8.17 /uv /uvx /bin/
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY app ./app
COPY docs ./docs
COPY mkdocs.yml ./mkdocs.yml
EXPOSE 8080
ENV PORT=8080
ENV DATABASE_URL=/data/work_queue.db
CMD ["/usr/local/bin/work-queue-api"]
CMD ["uv", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]