fixed try catch and added git to permanent dependency
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
FROM python:3.10-alpine3.18
|
FROM python:3.10-alpine3.18
|
||||||
|
|
||||||
#Install all dependencies.
|
#Install all dependencies.
|
||||||
RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg libwebp libxml2-dev libxslt-dev openldap
|
RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg libwebp libxml2-dev libxslt-dev openldap git
|
||||||
|
|
||||||
#Print all logs without buffering it.
|
#Print all logs without buffering it.
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
@ -19,7 +19,7 @@ RUN \
|
|||||||
if [ `apk --print-arch` = "armv7" ]; then \
|
if [ `apk --print-arch` = "armv7" ]; then \
|
||||||
printf "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; \
|
printf "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; \
|
||||||
fi
|
fi
|
||||||
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 git && \
|
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 && \
|
echo -n "INPUT ( libldap.so )" > /usr/lib/libldap_r.so && \
|
||||||
python -m venv venv && \
|
python -m venv venv && \
|
||||||
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \
|
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \
|
||||||
|
@ -319,10 +319,9 @@ def system(request):
|
|||||||
|
|
||||||
secret_key = False if os.getenv('SECRET_KEY') else True
|
secret_key = False if os.getenv('SECRET_KEY') else True
|
||||||
|
|
||||||
r = subprocess.check_output(['git', 'show', '-s'], cwd=BASE_DIR)
|
|
||||||
# r = subprocess.check_output(['git', 'show', '-s'], cwd=os.path.join(BASE_DIR, 'recipes', 'plugins', 'enterprise_plugin'))
|
|
||||||
version_info = []
|
version_info = []
|
||||||
try:
|
try:
|
||||||
|
r = subprocess.check_output(['git', 'show', '-s'], cwd=BASE_DIR)
|
||||||
version_info.append({
|
version_info.append({
|
||||||
'name': 'Tandoor ' + VERSION_NUMBER,
|
'name': 'Tandoor ' + VERSION_NUMBER,
|
||||||
'version': re.sub(r'<.*>', '', r.decode()),
|
'version': re.sub(r'<.*>', '', r.decode()),
|
||||||
|
Reference in New Issue
Block a user