Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Mar 5, 2024
2 parents 21f1700 + d104974 commit a626bda
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-alpine3.18
FROM python:3.12-alpine3.19

#Install all dependencies.
RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg libwebp libxml2-dev libxslt-dev openldap git
Expand All @@ -25,8 +25,8 @@ RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-de
echo -n "INPUT ( libldap.so )" > /usr/lib/libldap_r.so && \
python -m venv venv && \
/opt/recipes/venv/bin/python -m pip install --upgrade pip && \
venv/bin/pip install wheel==0.37.1 && \
venv/bin/pip install setuptools_rust==1.1.2 && \
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

Expand Down
7 changes: 7 additions & 0 deletions docs/system/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ This can either be a relative path from the applications base path or the url of
MEDIA_URL=/media/
```

#### Media root

> default `<basedir>/mediafiles` - options `/some/other/media/path`.
Where mediafiles should be stored on disk. The default location is a
`mediafiles` subfolder at the root of the application directory.

#### Gunicorn Workers

> default `3` - options `1-X`
Expand Down
4 changes: 2 additions & 2 deletions recipes/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,10 @@
AWS_S3_CUSTOM_DOMAIN = os.getenv('S3_CUSTOM_DOMAIN', '')

MEDIA_URL = os.getenv('MEDIA_URL', '/media/')
MEDIA_ROOT = os.path.join(BASE_DIR, "mediafiles")
MEDIA_ROOT = os.getenv('MEDIA_ROOT', os.path.join(BASE_DIR, "mediafiles"))
else:
MEDIA_URL = os.getenv('MEDIA_URL', '/media/')
MEDIA_ROOT = os.path.join(BASE_DIR, "mediafiles")
MEDIA_ROOT = os.getenv('MEDIA_ROOT', os.path.join(BASE_DIR, "mediafiles"))

# Serve static files with gzip
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ django-auth-ldap==4.6.0
pyppeteer==2.0.0
validators==0.20.0
pytube==15.0.0
homeassistant-api==4.2.1
homeassistant-api==4.1.1.post2

# Development
pytest==8.0.0
Expand Down

0 comments on commit a626bda

Please sign in to comment.