mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
82ba9833f2
* dev: enable api logging and control worker count through env * dev: enable logger instead of printing * dev: remove worker counts * dev: enable global level log settings * dev: add rotating logger * fix: logging configuration * dev: api logging and moving the capture exception to utils for logging and then capturing * fix: information leaking through print logs * dev: linting fix * dev: logging configuration for django * fix: linting errors * dev: add logs for migrator * dev: logging cofiguration * dev: add permision for captain user in Plane * dev: add log paths in compose * dev: create directory for logs * dev: fix linting errors
63 lines
1.2 KiB
Docker
63 lines
1.2 KiB
Docker
FROM python:3.11.1-alpine3.17 AS backend
|
|
|
|
# set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
|
WORKDIR /code
|
|
|
|
RUN apk --no-cache add \
|
|
"libpq~=15" \
|
|
"libxslt~=1.1" \
|
|
"nodejs-current~=19" \
|
|
"xmlsec~=1.2"
|
|
|
|
COPY requirements.txt ./
|
|
COPY requirements ./requirements
|
|
RUN apk add --no-cache libffi-dev
|
|
RUN apk add --no-cache --virtual .build-deps \
|
|
"bash~=5.2" \
|
|
"g++~=12.2" \
|
|
"gcc~=12.2" \
|
|
"cargo~=1.64" \
|
|
"git~=2" \
|
|
"make~=4.3" \
|
|
"postgresql13-dev~=13" \
|
|
"libc-dev" \
|
|
"linux-headers" \
|
|
&& \
|
|
pip install -r requirements.txt --compile --no-cache-dir \
|
|
&& \
|
|
apk del .build-deps
|
|
|
|
|
|
RUN addgroup -S plane && \
|
|
adduser -S captain -G plane
|
|
|
|
RUN chown captain.plane /code
|
|
|
|
USER captain
|
|
|
|
# Add in Django deps and generate Django's static files
|
|
COPY manage.py manage.py
|
|
COPY plane plane/
|
|
COPY templates templates/
|
|
COPY package.json package.json
|
|
USER root
|
|
RUN apk --no-cache add "bash~=5.2"
|
|
COPY ./bin ./bin/
|
|
|
|
RUN mkdir /code/plane/logs
|
|
RUN chmod +x ./bin/takeoff ./bin/worker ./bin/beat
|
|
RUN chmod -R 777 /code
|
|
RUN chown -R captain:plane /code
|
|
|
|
USER captain
|
|
|
|
# Expose container port and run entry point script
|
|
EXPOSE 8000
|
|
|
|
# CMD [ "./bin/takeoff" ]
|
|
|