An open, easy, fast, reliable and battery-efficient solution for real-time communications
docker pull dunglas/mercure:latest
docker run -d --name mercure -p 8080:8080 --restart always dunglas/mercure:latest
podman run -d --name mercure -p 8080:8080 --restart always dunglas/mercure:latest
skopeo inspect docker://docker.io/dunglas/mercure:latest
oras pull dunglas/mercure:latest
# syntax=docker/dockerfile:1
FROM python:3.13-slim AS build
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
FROM python:3.13-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PATH="/install/bin:${PATH}" \
PYTHONPATH="/install/lib/python3.13/site-packages"
WORKDIR /app
COPY --from=build /install /install
COPY main.py ./
COPY static static
COPY templates templates
RUN groupadd --gid 65532 nonroot && \
useradd --uid 65532 --gid 65532 --no-create-home --shell /sbin/nologin nonroot
USER 65532:65532
EXPOSE 8080
CMD ["gunicorn", "--bind=0.0.0.0:8080", "--workers=2", "main:app"]