-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile.beat
More file actions
38 lines (30 loc) · 1.09 KB
/
Copy pathDockerfile.beat
File metadata and controls
38 lines (30 loc) · 1.09 KB
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
31
32
33
34
35
36
37
38
FROM python:3.13-slim AS base
# Setup env
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONFAULTHANDLER=1
# Install compilation dependencies
RUN apt-get update && apt-get install -y --no-install-recommends gcc git && rm -rf /var/lib/apt/lists/*
FROM base AS runtime
COPY --from=ghcr.io/astral-sh/uv:0.12.7@sha256:9e049ccf355e1c6d11416ba84760b4af443e5d2f0d45867c03b36744beb6ee22 /usr/local/bin/uv /usr/local/bin/uv
# Create and switch to a new user
RUN useradd --create-home appuser
WORKDIR /home/appuser
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-build --no-binary-package django-memoize --no-dev
# Install application into container
COPY extralifeapi extralifeapi
COPY fforg fforg
COPY ffstream ffstream
COPY ffdonations ffdonations
COPY ffsite ffsite
COPY eventer eventer
COPY evtsignup evtsignup
COPY ffoverlay ffoverlay
COPY ffbot ffbot
COPY ffdiscord ffdiscord
COPY manage.py .
RUN chown -R appuser /home/appuser
USER appuser
CMD [ "uv", "run", "--no-sync", "--no-build", "celery", "-A", "fforg", "worker", "--autoscale=1,1", "--beat", "-Q", "alerts,celery" ]