mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
feat: re-add venv
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -25,23 +25,24 @@ RUN \
|
||||
RUN sed -i '/# Development/,$d' requirements.txt
|
||||
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-dev jpeg-dev libwebp-dev openssl-dev libffi-dev cargo openldap-dev python3-dev && \
|
||||
echo -n "INPUT ( libldap.so )" > /usr/lib/libldap_r.so && \
|
||||
python -m pip install --upgrade pip && \
|
||||
pip install wheel==0.42.0 && \
|
||||
pip install setuptools_rust==1.9.0 && \
|
||||
pip install -r requirements.txt --no-cache-dir &&\
|
||||
python -m venv venv && \
|
||||
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \
|
||||
venv/bin/pip install wheel==0.42.0 && \
|
||||
venv/bin/pip install setuptools_rust==1.9.0 && \
|
||||
venv/bin/pip install -r requirements.txt --no-cache-dir &&\
|
||||
apk --purge del .build-deps
|
||||
|
||||
#Copy project and execute it.
|
||||
COPY . ./
|
||||
|
||||
# collect the static files
|
||||
RUN python manage.py collectstatic_js_reverse
|
||||
RUN python manage.py collectstatic --noinput
|
||||
RUN /opt/recipes/venv/bin/python manage.py collectstatic_js_reverse
|
||||
RUN /opt/recipes/venv/bin/python manage.py collectstatic --noinput
|
||||
# copy the collected static files to a different location, so they can be moved into a potentially mounted volume
|
||||
RUN mv /opt/recipes/staticfiles /opt/recipes/staticfiles-collect
|
||||
|
||||
# collect information from git repositories
|
||||
RUN python version.py
|
||||
RUN /opt/recipes/venv/bin/python version.py
|
||||
# delete git repositories to reduce image size
|
||||
RUN find . -type d -name ".git" | xargs rm -rf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user