- Introduced `/scripts/.venv/bin/easy-haproxy` as the default entrypoint for standalone environments. - Added `_build_parser` and `start` functions to enable CLI-driven functionality configuration. - Updated packaging to reflect new `easyhaproxy.main` module and adapted project name from `easymapping` to `easyhaproxy`. - Modified `Dockerfile` to align with new script paths and entrypoints for better portability. - Enhanced documentation with dedicated sections for pip-based installation, CLI references, and systemd setup for non-Docker environments. - Adjusted helm, plugin, and environment-related docs for accurate sidebar ordering. - Added a new GitHub workflow to automate package publishing to PyPI.
39 lines
1.4 KiB
Docker
39 lines
1.4 KiB
Docker
FROM alpine:3.23
|
|
|
|
ARG RELEASE_VERSION_ARG
|
|
|
|
ENV RELEASE_VERSION=$RELEASE_VERSION_ARG
|
|
ENV TZ="Etc/UTC"
|
|
|
|
RUN apk add --no-cache haproxy bash python3 certbot openssl curl \
|
|
&& apk add --no-cache --virtual .build-deps build-base python3-dev musl-dev linux-headers \
|
|
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
|
|
&& ln -s /root/.local/bin/uv /usr/local/bin/uv
|
|
|
|
RUN mkdir -p /etc/easyhaproxy/haproxy \
|
|
&& openssl dhparam -out /etc/easyhaproxy/haproxy/dhparam 2048 \
|
|
&& openssl dhparam -out /etc/easyhaproxy/haproxy/dhparam-1024 1024 \
|
|
&& mkdir -p /etc/easyhaproxy/certs/certbot /etc/easyhaproxy/certs/haproxy \
|
|
&& openssl req -x509 -newkey rsa:2048 -nodes -days 365 \
|
|
-keyout /tmp/placeholder.key \
|
|
-out /tmp/placeholder.crt \
|
|
-subj "/CN=placeholder" \
|
|
&& cat /tmp/placeholder.crt /tmp/placeholder.key > /etc/easyhaproxy/certs/certbot/placeholder.pem \
|
|
&& cat /tmp/placeholder.crt /tmp/placeholder.key > /etc/easyhaproxy/certs/haproxy/placeholder.pem \
|
|
&& rm /tmp/placeholder.key /tmp/placeholder.crt
|
|
|
|
WORKDIR /scripts
|
|
|
|
COPY build/assets /
|
|
|
|
COPY pyproject.toml uv.lock LICENSE README.md /scripts/
|
|
COPY src/ /scripts/src/
|
|
COPY tests/ /scripts/tests/
|
|
|
|
RUN cd /scripts && uv sync --frozen
|
|
|
|
RUN apk del .build-deps
|
|
|
|
RUN cd /scripts && uv run pytest -s -vv tests/ && uv sync --no-dev
|
|
|
|
CMD ["/scripts/.venv/bin/easy-haproxy"]
|