-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 1.01 KB
/
Copy pathDockerfile
File metadata and controls
29 lines (23 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM rust:1.98-slim AS editorial-core
WORKDIR /build
COPY Cargo.toml Cargo.lock ./
COPY rust ./rust
RUN cargo build --locked --release --workspace
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PORT=8000
RUN apt-get update \
&& apt-get install -y --no-install-recommends git ffmpeg ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=editorial-core /build/target/release/jeonghan-editorial-core /usr/local/bin/jeonghan-editorial-core
COPY requirements.txt requirements-optional-media.txt ./
RUN python -m pip install --no-cache-dir --upgrade "pip>=26.1.2" \
&& python -m pip install --no-cache-dir -r requirements.txt \
&& (python -m pip install --no-cache-dir -r requirements-optional-media.txt || true) \
&& python -m pip check
COPY . .
RUN python -m compileall -q app tools
CMD ["sh", "-c", "python -m app.render_preflight && exec uvicorn app.webhook_server:api --host 0.0.0.0 --port ${PORT:-8000} --workers 1"]