Closed allthesignals closed 5 years ago
Needed to change the way the app config was loaded in initializers/application_config.rb
:
APP_CONFIG = YAML.load(ERB.new(File.read(CONFIG_PATH)).result)[Rails.env]
That's great. Please let me know if there's other ways the code can be improved. I am also looking towards getting it fully Dockerized in the near future!
Thanks @timwaters - here's my fork here, you will see a Dockerfile and a docker-compose.yml
file: https://github.com/allthesignals/mapwarper. Brief instructions were added to the README as well.
There are only 2 containers, the Rails app and the Redis cache. I am using hosting a Postgres database separately, but I think we will want to include a Docker container for that as well.
~Hi there - first off, thank you for this incredible work.~
~I'm very close to getting this set up in a Docker container, but I'm stuck on something: editing records throws an error,
InvalidAuthenticityToken
.~~I don't want to change any source code because it seems like I am configuring something incorrectly. Any clues? Anything come to mind? Thanks so much!~
~Here's the full trace:~
This comes to a Javascript parsing error caused by the fact that I'm trying to make these YAML files work with environment variables: https://github.com/allthesignals/mapwarper/blob/master/config/application.yml#L3.
For some reason, Rails isn't parsing these templated YAML files, hence invalid JavaScript being dropped into the app.
I'm not sure why this is the case because the templated variables work for
database.yml
andsecrets.yml
.