diff --git a/roles/docker_sbs/defaults/main.yml b/roles/docker_sbs/defaults/main.yml index f37c6b3f..bf9883e6 100644 --- a/roles/docker_sbs/defaults/main.yml +++ b/roles/docker_sbs/defaults/main.yml @@ -19,7 +19,7 @@ sbs_dbbackup_user: "sbs_backupper" sbs_migration_user: "sbs_migrater" -sbs_redis_host: "localhost" +sbs_redis_host: "redis" sbs_redis_port: 6379 sbs_redis_ssl: false diff --git a/roles/docker_sbs/tasks/main.yml b/roles/docker_sbs/tasks/main.yml index 80f40722..e23e3ef4 100644 --- a/roles/docker_sbs/tasks/main.yml +++ b/roles/docker_sbs/tasks/main.yml @@ -238,6 +238,17 @@ # changed_when: "'[alembic.runtime.migration] Running upgrade' in result.stderr" # notify: "restart sbs" +- name: Create redis container + docker_container: + name: sbs-redis + image: redis:7 + # restart_policy: "always" + # restart: true + state: started + # pull: true + networks: + - name: "traefik" + # We need to remove sram-static so it gets repopulated # with new SBS image static content - name: Stop and remove sbs and sbs-nginx containers diff --git a/roles/docker_sbs/templates/config.yml.j2 b/roles/docker_sbs/templates/config.yml.j2 index 6a6394a2..2e2379db 100644 --- a/roles/docker_sbs/templates/config.yml.j2 +++ b/roles/docker_sbs/templates/config.yml.j2 @@ -5,7 +5,7 @@ database: permanent_session_lifetime: 1440 redis: - uri: "redis{% if sbs_redis_ssl %}s{% endif %}://:{{sbs_redis_password}}@{{sbs_redis_host}}:{{sbs_redis_port}}/" + uri: "redis://@{{sbs_redis_host}}/" # add a per-release suffix here to invalidate sessions on new releases secret_key: {{ sbs_db_secret }}{{sbs_secret_key_suffix}} diff --git a/roles/docker_sbs/templates/sbs-nginx.j2 b/roles/docker_sbs/templates/sbs-nginx.j2 index fadf503a..898243de 100644 --- a/roles/docker_sbs/templates/sbs-nginx.j2 +++ b/roles/docker_sbs/templates/sbs-nginx.j2 @@ -4,6 +4,7 @@ events { } http { + include /etc/nginx/mime.types; server { listen 80; http2 on;