aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: af798d642a044f563d3c646a10191242bcb0bf88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:3.12-slim

# Allow service to handle stops gracefully
STOPSIGNAL SIGQUIT

# Install dependencies
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry install  --without dev

# Copy all files to container
COPY . .

# Set Git SHA build argument
ARG git_sha="development"

# Set Git SHA environment variable
ENV GIT_SHA=$git_sha

# Start the server with uvicorn
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["poetry run alembic upgrade head && poetry run uvicorn backend:app --host 0.0.0.0 --port 8000"]