Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbe65a3357 | ||
|
|
ccc4cc4c6a |
+17
-13
@@ -1,19 +1,23 @@
|
||||
FROM python:3.12-alpine
|
||||
FROM python:3.12-slim as builder
|
||||
|
||||
ENV PORT=8000
|
||||
ENV HOST=0.0.0.0
|
||||
RUN apt-get update && apt-get install -y curl && \
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
||||
apt-get purge -y curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH="/root/.cargo/bin:$PATH"
|
||||
|
||||
WORKDIR /app
|
||||
RUn pip install uv granian
|
||||
COPY requirements.txt .
|
||||
RUN uv pip install -r requirements.txt --target /opt/dependencies
|
||||
|
||||
RUN pip install hypercorn
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install -r requirements.txt
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONPATH="/opt/dependencies:$PYTHONPATH"
|
||||
COPY --from=builder /opt/dependencies /opt/dependencies
|
||||
RUN pip install granian
|
||||
|
||||
COPY ./app /app
|
||||
|
||||
# ENV PATH="$PATH:/root/.local/bin"
|
||||
|
||||
WORKDIR /
|
||||
COPY ./hypercorn.toml ./
|
||||
|
||||
ENTRYPOINT ["hypercorn", "-c", "hypercorn.toml", "app.main:app"]
|
||||
ENTRYPOINT ["granian", "--interface", "asgi", "--host", "0.0.0.0", "--port", "8000", "--http", "auto", "app.main:app"]
|
||||
|
||||
@@ -2,3 +2,4 @@ services:
|
||||
time-assistant:
|
||||
image: marcpartensky/time-assistant
|
||||
build: .
|
||||
env_file: .env
|
||||
|
||||
Reference in New Issue
Block a user