From 09f0773c1863b15728e7896ff88f8bd076e864cd Mon Sep 17 00:00:00 2001 From: briwa Date: Mon, 30 Mar 2020 11:48:38 +0800 Subject: [PATCH] refactor(docker): move redis env config to docker (#6936) instead of in config/application.yml --- Dockerfile | 4 ++++ docker-compose.yml | 1 + docs/installation/docker.md | 8 -------- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 38ede7058..fc257713a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,6 +71,10 @@ ENV DATABASE_URL="postgresql://devto:devto@db:5432/PracticalDeveloper_developmen ENV DB_SETUP="false" \ DB_MIGRATE="false" +# In order for redis to work, these should be set +ENV REDIS_URL="redis://redis:6379" \ + REDIS_SESSIONS_URL="redis://redis:6379" + # # Let's setup the public uploads folder volume # diff --git a/docker-compose.yml b/docker-compose.yml index 8a78ff308..bf988a3bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,7 @@ services: YARN_INTEGRITY_ENABLED: "false" ELASTICSEARCH_URL: http://elasticsearch:9200 REDIS_URL: redis://redis:6379 + REDIS_SESSIONS_URL: redis://redis:6379 volumes: - .:/usr/src/app command: bundle exec rails server -b 0.0.0.0 -p 3000 diff --git a/docs/installation/docker.md b/docs/installation/docker.md index 9a221a380..a65c9b996 100644 --- a/docs/installation/docker.md +++ b/docs/installation/docker.md @@ -50,14 +50,6 @@ well. GITHUB_SECRET: "ANOTHER_REAL_SECURE_KEY_HERE" ``` - - Update the redis url variables by adding the following lines into - `config/application.yml`: - - ```shell - REDIS_URL: "redis://redis:6379" - REDIS_SESSIONS_URL: "redis://redis:6379" - ``` - - You do not need "real" keys for basic development. Some features require certain keys, so you may be able to add them as you go.