Files
watcher-visio/Dockerfile
2025-12-01 15:30:36 +03:00

39 lines
807 B
Docker

FROM node:25-alpine AS node-build-stage
COPY ./watcher_visio/static ./
RUN npx tailwindcss \
-i input.css \
-o ./tailwind.css --minify
FROM alpine:3 AS venv-build-stage
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 \
git bash build-base python3-dev
RUN python3 -m venv /venv
ENV PATH "/venv/bin:$PATH"
COPY ./watcher_visio/requirements.txt /
RUN pip install -r /requirements.txt
FROM alpine:3
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
COPY --from=build /venv /venv
RUN mkdir /app
COPY --from=build /app /app
WORKDIR /app
CMD [ "python", "manage.py", "runserver", "0.0.0.0:8000" ]