Skip to content

Commit

Permalink
Implement changes necessary to run under Docker
Browse files Browse the repository at this point in the history
Using (gpodder#32) and
(gpodder#397) as a starting point, we
implement some changes to get mygpo to run correctly under Docker.

To actually make use of this, we need an as-yet-unpublished `Dockerfile`
and `docker-compose.yaml`.
  • Loading branch information
jgrocho committed Aug 4, 2020
1 parent f502042 commit 6a968e8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mygpo/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ msgstr "Podcast inconnu"
#: mygpo/podcasts/models.py:700
#, python-brace-format
msgid "Unknown Podcast from {domain}"
msgstr "Podcast inconnu de {domaine}"
msgstr "Podcast inconnu de {domain}"

#: mygpo/podcasts/templates/episode.html:85
#: mygpo/podcasts/templates/episodes.html:27
Expand Down
3 changes: 2 additions & 1 deletion mygpo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_intOrNone(name, default):

# Static Files

STATIC_ROOT = 'staticfiles'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'

STATICFILES_DIRS = (os.path.abspath(os.path.join(BASE_DIR, '..', 'static')),)
Expand Down Expand Up @@ -137,6 +137,7 @@ def get_intOrNone(name, default):


MIDDLEWARE = [
'whitenoise.middleware.WhiteNoiseMiddelware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
Expand Down
4 changes: 2 additions & 2 deletions mygpo/users/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def check_case_insensitive_users(app_configs=None, **kwargs):
wid = 'users.W001'
errors.append(Warning(txt, id=wid))

except OperationalError as oe:
if 'no such table: auth_user' in str(oe):
except (OperationalError, ProgrammingError) as oe:
if 'no such table: auth_user' in str(oe) or 'relation "auth_user" does not exist' in str(oe):
# Ignore if the table does not yet exist, eg when initally
# running ``manage.py migrate``
pass
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ django-celery-results==1.2.1
django-celery-beat==2.0.0
requests==2.24.0
django-db-geventpool==3.2.2
whitenoise==5.0.1

0 comments on commit 6a968e8

Please sign in to comment.