Add env vars to docker-compose and improve env check

This commit is contained in:
riggraz
2019-09-24 18:57:42 +02:00
parent 9bdbcef0ab
commit 7d50454d14
5 changed files with 41 additions and 22 deletions

View File

@@ -21,11 +21,11 @@ module App
end
def email_confirmation?
ENV["EMAIL_CONFIRMATION"] == "1"
ENV["EMAIL_CONFIRMATION"] == "yes"
end
def show_logo?
ENV["SHOW_LOGO"] == "1"
ENV["SHOW_LOGO"] == "yes"
end
def posts_per_page

View File

@@ -4,8 +4,8 @@
# and recreated between test runs. Don't rely on the data there!
# Set up default environment variables
ENV["EMAIL_CONFIRMATION"] = "0"
ENV["POSTS_PER_PAGE"] = "8"
ENV["EMAIL_CONFIRMATION"] = "no"
ENV["POSTS_PER_PAGE"] = "15"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.