-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 913 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (23 loc) · 913 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
# dashboard-web Dockerfile.
#
# Build context is apps/python-app/ (so the shared libs/cssc_common library is
# available):
#
# docker build -f services/dashboard-web/Dockerfile -t dashboard-web .
# Base image is sourced from the package repo (golden). Overridable for local
# dev if the golden tag is not yet available.
ARG BASE_IMAGE=ghcr.io/toddysm/golden/python:3.14-slim
FROM ${BASE_IMAGE}
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/src
WORKDIR /app
COPY libs/cssc_common /tmp/cssc_common
RUN pip install --no-cache-dir /tmp/cssc_common && rm -rf /tmp/cssc_common
COPY services/dashboard-web/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY services/dashboard-web/src ./src
RUN useradd --create-home --uid 10001 appuser
USER 10001
EXPOSE 8080
CMD ["uvicorn", "dashboard_web.app:app", "--host", "0.0.0.0", "--port", "8080"]