insight/Dockerfile
2025-11-18 22:36:27 +00:00

34 lines
1 KiB
Docker

FROM python:3.12-slim
# DO NOT PUSH IMAGE TO ECR!!! as anyone with access to image can log on to our aws
# Will log on as aws Jun-te account, change in the future to development account
ENV AWS_ACCESS_KEY_ID=AKIAU5A36PPNK7RXX52V
ENV AWS_SECRET_ACCESS_KEY=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
ENV AWS_DEFAULT_REGION=eu-west-2
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl jq \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN pip install poetry
# Set working directory
WORKDIR /app
# Copy only Poetry files first (cache layer)
COPY backend/pyproject.toml backend/poetry.lock /app/
# Install dependencies without creating a virtualenv
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi --no-root
# Copy project code
COPY . /app
# Expose port (Render uses PORT env var)
EXPOSE 8000
# Run Dash app via Gunicorn
CMD ["gunicorn", "backend.src.dashboard.main:server", "--bind", "0.0.0.0:8000"]