2026-04-21 14:48:33 -03:00
|
|
|
FROM registry.bstein.dev/bstein/python:3.12-slim AS base
|
2026-01-28 11:46:52 -03:00
|
|
|
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
2026-04-21 15:14:10 -03:00
|
|
|
PYTHONUNBUFFERED=1 \
|
|
|
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
|
|
|
PIP_DEFAULT_TIMEOUT=60
|
2026-01-28 11:46:52 -03:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
2026-02-05 15:37:52 -03:00
|
|
|
COPY requirements.txt /app/requirements.txt
|
2026-04-20 01:12:10 -03:00
|
|
|
COPY pyproject.toml /app/pyproject.toml
|
2026-04-21 15:14:10 -03:00
|
|
|
RUN pip install --no-cache-dir --retries 10 -r /app/requirements.txt
|
2026-01-28 11:46:52 -03:00
|
|
|
|
|
|
|
|
COPY atlasbot /app/atlasbot
|
2026-04-22 00:00:09 -03:00
|
|
|
RUN addgroup --system atlasbot && \
|
|
|
|
|
adduser --system --ingroup atlasbot --home /app atlasbot && \
|
|
|
|
|
chown -R atlasbot:atlasbot /app
|
2026-01-28 11:46:52 -03:00
|
|
|
|
2026-02-03 19:08:26 -03:00
|
|
|
FROM base AS test
|
2026-04-21 15:14:10 -03:00
|
|
|
COPY requirements-dev.txt /app/requirements-dev.txt
|
|
|
|
|
RUN pip install --no-cache-dir --retries 10 -r /app/requirements-dev.txt
|
2026-04-20 01:12:10 -03:00
|
|
|
COPY testing /app/testing
|
2026-02-03 19:08:26 -03:00
|
|
|
COPY tests /app/tests
|
2026-02-03 19:32:14 -03:00
|
|
|
COPY scripts /app/scripts
|
2026-02-03 19:08:26 -03:00
|
|
|
|
|
|
|
|
FROM base AS runtime
|
2026-01-28 11:46:52 -03:00
|
|
|
EXPOSE 8090
|
2026-04-22 00:00:09 -03:00
|
|
|
USER atlasbot
|
2026-01-28 11:46:52 -03:00
|
|
|
CMD ["python", "-m", "atlasbot.main"]
|