FROM python:3.11-alpine ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \ PIP_NO_CACHE_DIR=1 \ PIP_ROOT_USER_ACTION=ignore # install system pkg deps RUN apk add libpq postgresql-dev --virtual .build-deps coreutils gcc libc-dev libffi-dev make COPY etebase_server/ /app/etebase_server/ COPY requirements.txt manage.py /app/ WORKDIR /app # 1. install app pip requirements # 2. generate static files # 3. cleanup RUN pip install -U pip && \ pip install --no-cache-dir --progress-bar off -r ./requirements.txt && \ pip install --no-cache-dir --progress-bar off psycopg2==2.9.6 && \ \ python manage.py collectstatic --noinput && \ \ apk del .build-deps make gcc coreutils && \ apk add libpq && \ rm -rf /root/.cache ENV ETEBASE_EASY_CONFIG_PATH=/app/server.conf VOLUME /data ENTRYPOINT ["uvicorn", "etebase_server.asgi:application"]