- Updated Dockerfile to standardize environment variable syntax and improve readability. - Added new CSS variables for chart grid color and enhanced dark theme contrast for CPU chart statistics. - Modified index.html to utilize new CSS variables for better theme adaptability and improved chart rendering.
42 lines
1.0 KiB
Docker
42 lines
1.0 KiB
Docker
FROM alpine:3.21 AS build
|
|
|
|
RUN apk update && \
|
|
apk add --no-cache --virtual .build-deps \
|
|
ca-certificates gcc postgresql-dev linux-headers musl-dev \
|
|
libffi-dev jpeg-dev zlib-dev \
|
|
build-base python3-dev dos2unix
|
|
|
|
RUN python3 -m venv /venv
|
|
ENV PATH="/venv/bin:$PATH"
|
|
COPY ./requirements.txt /
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
pip install -r /requirements.txt
|
|
|
|
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
|
|
RUN dos2unix /docker-entrypoint.sh && \
|
|
chmod +x /docker-entrypoint.sh
|
|
|
|
|
|
FROM alpine:3.21
|
|
|
|
ENV LANG=C.UTF-8
|
|
ENV LC_ALL=C.UTF-8
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PATH="/venv/bin:$PATH"
|
|
|
|
RUN apk add --no-cache --update python3 curl
|
|
|
|
COPY --from=build /venv /venv
|
|
COPY --from=build /docker-entrypoint.sh /docker-entrypoint.sh
|
|
|
|
WORKDIR /app
|
|
COPY . /app
|
|
ENV DJANGO_SETTINGS_MODULE=watcher_visio.settings
|
|
RUN python3 manage.py collectstatic --noinput
|
|
|
|
RUN adduser -D -g "" app && chown -R app:app /app
|
|
USER app
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
CMD ["python3", "manage.py", "runserver", "0.0.0.0:8080"] |