created new role
This commit is contained in:
25
roles/trade_hub/files/trade-hub/backend/Dockerfile
Normal file
25
roles/trade_hub/files/trade-hub/backend/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM docker.io/library/python:3.12-slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
# Download the full scunpacked dataset at build time so the image is
|
||||
# self-contained; fetch_data.py reduces items.json to commodities.json.
|
||||
RUN python scripts/fetch_data.py --output-dir /app/data/full
|
||||
ENV DATA_DIR=/app/data/full
|
||||
|
||||
RUN useradd --create-home appuser \
|
||||
&& chown -R appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user