refactor(docker): move redis env config to docker (#6936)

instead of in config/application.yml
This commit is contained in:
briwa 2020-03-30 11:48:38 +08:00 committed by GitHub
parent 6c302f712a
commit 09f0773c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 8 deletions

View file

@ -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
#

View file

@ -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

View file

@ -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.