34 lines
794 B
Docker
34 lines
794 B
Docker
# download image here: https://docker.aityp.com/image/docker.io/python:3.12-slim
|
|
FROM python:3.12-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy requirements file
|
|
COPY requirements.txt .
|
|
|
|
# Install dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy environment file
|
|
COPY local.env .
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# StarRocks settings
|
|
ENV STARROCKS_HOST: str = "freeleaps-starrocks-cluster-fe-service.freeleaps-data-platform.svc"
|
|
ENV STARROCKS_PORT: int = 9030
|
|
ENV STARROCKS_USER: str = "root"
|
|
ENV STARROCKS_PASSWORD: str = ""
|
|
ENV STARROCKS_DATABASE: str = "freeleaps"
|
|
|
|
# Prometheus settings
|
|
ENV PROMETHEUS_ENDPOINT: str = "http://localhost:9090"
|
|
|
|
# Expose port
|
|
EXPOSE 8009
|
|
|
|
# Start command
|
|
CMD ["uvicorn", "webapi.main:app", "--host", "0.0.0.0", "--port", "8009"]
|