-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 707 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (23 loc) · 707 Bytes
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
30
31
# Stage 1: build frontend
FROM oven/bun:1 AS frontend-builder
WORKDIR /build
COPY frontend/package.json frontend/bun.lock ./
RUN bun install --frozen-lockfile
COPY frontend/ .
RUN bun run build
# Stage 2: Python runtime
FROM python:3.13.12-slim
LABEL maintainer="Sean-Michael seanm.riesterer@gmail.com"
WORKDIR /code
ENV PORT=8000
ENV CONTENT_SOURCE=s3
ENV S3_CONTENT_BUCKET=smr-webdev-content
ENV AWS_REGION=us-west-2
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app/ app/
COPY --from=frontend-builder /build/dist/ frontend/dist/
RUN useradd --create-home appuser
USER appuser
EXPOSE ${PORT}
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"]