diff --git a/docker/Dockerfile b/docker/Dockerfile --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,6 +8,7 @@ libpq-dev \ libsvn-dev \ libsystemd-dev \ + memcached \ postgresql-client \ wait-for-it \ ngrep && \ diff --git a/docker/conf/web.yml b/docker/conf/web.yml --- a/docker/conf/web.yml +++ b/docker/conf/web.yml @@ -37,8 +37,10 @@ serve_assets: yes development_db: /tmp/db.sqlite3 +production_db: /tmp/db.sqlite3 throttling: + cache_uri: 127.0.0.1:11211 scopes: swh_api: limiter_rate: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -238,7 +238,7 @@ - ./env/common_python.env environment: VERBOSITY: 3 - DJANGO_SETTINGS_MODULE: swh.web.settings.development + DJANGO_SETTINGS_MODULE: swh.web.settings.production SWH_CONFIG_FILENAME: /web.yml entrypoint: /entrypoint.sh volumes: diff --git a/docker/services/swh-web/entrypoint.sh b/docker/services/swh-web/entrypoint.sh --- a/docker/services/swh-web/entrypoint.sh +++ b/docker/services/swh-web/entrypoint.sh @@ -23,6 +23,9 @@ exec bash -i ;; *) + echo "Starting memcached" + memcached& + echo "Migrating db using ${DJANGO_SETTINGS_MODULE}" django-admin migrate --settings=${DJANGO_SETTINGS_MODULE}