Some checks failed
Branch Build CE / Build Setup (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Sync Repositories / sync_changes (push) Has been cancelled
Branch Build CE / Build-Push Admin Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
66 lines
1.5 KiB
Docker
66 lines
1.5 KiB
Docker
FROM python:3.12.10-alpine
|
|
|
|
# set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
ENV INSTANCE_CHANGELOG_URL=https://sites.plane.so/pages/691ef037bcfe416a902e48cb55f59891/
|
|
|
|
# Configure Chinese mirrors for pip
|
|
ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple/
|
|
ENV PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
|
|
|
|
# Configure Chinese mirrors for apk
|
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|
|
|
# Update system packages for security
|
|
RUN apk update && apk upgrade
|
|
|
|
WORKDIR /code
|
|
|
|
RUN apk add --no-cache --upgrade \
|
|
"libpq" \
|
|
"libxslt" \
|
|
"xmlsec" \
|
|
"ca-certificates" \
|
|
"openssl"
|
|
|
|
COPY requirements.txt ./
|
|
COPY pip.conf /etc/pip.conf
|
|
COPY requirements ./requirements
|
|
RUN apk add --no-cache libffi-dev
|
|
RUN apk add --no-cache --virtual .build-deps \
|
|
"bash~=5.2" \
|
|
"g++" \
|
|
"gcc" \
|
|
"cargo" \
|
|
"git" \
|
|
"make" \
|
|
"postgresql-dev" \
|
|
"libc-dev" \
|
|
"linux-headers" \
|
|
&& \
|
|
pip install -r requirements.txt --compile --no-cache-dir \
|
|
&& \
|
|
apk del .build-deps \
|
|
&& \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
# 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
|
|
|
|
RUN apk --no-cache add "bash~=5.2"
|
|
COPY ./bin ./bin/
|
|
|
|
RUN mkdir -p /code/plane/logs
|
|
RUN chmod +x ./bin/*
|
|
RUN chmod -R 777 /code
|
|
|
|
# Expose container port and run entry point script
|
|
EXPOSE 8000
|
|
|
|
CMD ["./bin/docker-entrypoint-api.sh"] |