Docker setup for App and Redis

docker

(Nilesh Trivedi) #1

In discourse_docker repo, there exist sample files standalone.yml - which includes Discourse, Postgres, Redis. And there is web_only.yml which contains Discourse but not Postgres and Redis.

How do I make a template so that Discourse and Redis are configured using docker container but an external PostgresQL database is used. In other words, I need a web+redis.yml. How do I go about writing it?


(Kane York) #2

Take standalone.yml, remove postgres.template.yml, and set the pg connection info in the env variables.


(chamunks) #3

@nileshtrivedi I’ve been currently working through this kind of thing myself. If I were in your shoes I’d look at:

samples/data.yml
samples/web_only.yml

Just take all of the Redis settings and references out of the data.yml and paste them into the web_only.yml or you could try and work with this roughly created web config. Along with this roughly created data config.

Like a jerk I didn’t document anything or test anything so YMMV.

Edit
WARNING please keep in mind that if the Redis server is intended to store data long term you may want to verify that this configuration will in fact actually save any data if you rebuild your web_nosql container.


(Nilesh Trivedi) #4

Thanks @chamunks and @riking . I have submitted a pull request here: Added a sample template web_redis.yml by nileshtrivedi · Pull Request #141 · discourse/discourse_docker · GitHub


(Sam Saffron) #5

Sorry, I can’t support a sample for every permutation possible. Web redis is a VERY odd combo. Instead I would go with web_only AND redis (both of which exist) which would give you much less downtime when you need to re-bootstrap.


(Nilesh Trivedi) #6

@sam Makes sense. How do I go about using web_only AND redis? Specifically, how do I tell web_only container which Redis to connect to?


(Sam Saffron) #7

Just run a redis host, pull it on to the local ip address and then specify it here: