-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace `ENV.fetch(..., nil)` by `ENV.fetch(...)` This means that if the env variable is not set, we will encounter an exception which is good as otherwise we'd just ignore that exception even though it might result in serious repercussions. Regex used for matching (in VSCode): ENV.fetch\(".*",\snil\) * Sync `docker.env` with actual file on server * Replace `ENV[]` by `ENV.fetch(...)` whenever applicable Sometimes `ENV[]` is used in a statement where we check if the env variable is present or not. In this case, we did not change it to `ENV.fetch(...)`. * Fix missing quotes around env variable Error we got during deployment: docker.env: line 24: Users/mampf: No such file or directory * Source dummy `docker.env` file (workaround) See the comment in the code for an in-depth explanation for this workaround. * Replace `<>` syntax in env file to allow sourcing it * Copy dummy docker file into container * Use automatic export of env variables by setting `set -o allexport` (or equivalently: `set -a`). * Use new env syntax for registration limit check * Fall back to `nil` as was before for `RAILS_CACHE_ID`
- Loading branch information
Showing
17 changed files
with
92 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ class Application < Rails::Application | |
# the framework and any gems in your application. | ||
config.exception_handler = { | ||
# sends exception emails to a listed email (string // "[email protected]") | ||
email: ENV.fetch("ERROR_EMAIL", nil), | ||
email: ENV.fetch("ERROR_EMAIL"), | ||
|
||
# All keys interpolated as strings, so you can use | ||
# symbols, strings or integers where necessary | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
# note that it will be overwritten if you use your own mailer class | ||
# with default "from" parameter. | ||
config.mailer_sender = if Rails.env.production? | ||
ENV.fetch("FROM_ADDRESS", nil) | ||
ENV.fetch("FROM_ADDRESS") | ||
else | ||
"[email protected]" | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
GIT_BRANCH=production | ||
# Instance variables | ||
GIT_BRANCH=main | ||
COMPOSE_PROJECT_NAME=mampf | ||
INSTANCE_NAME=mampf | ||
|
||
|
@@ -14,15 +15,23 @@ MEMCACHED_SERVER=cache | |
FROM_ADDRESS=[email protected] | ||
MAILSERVER=mail.mathi.uni-heidelberg.de | ||
PROJECT_EMAIL=[email protected] | ||
ERROR_EMAIL=[email protected] | ||
PROJECT_NOTIFICATION_EMAIL=notificationmail | ||
MAILID_DOMAIN=mathi.uni-heidelberg.de | ||
ERROR_EMAIL=[email protected] | ||
IMAPSERVER=mail.mathi.uni-heidelberg.de | ||
PROJECT_EMAIL_USERNAME=creativeusername | ||
PROJECT_EMAIL_PASSWORD=secretsecret | ||
PROJECT_EMAIL_MAILBOX=Other Users/mampf | ||
PROJECT_EMAIL_MAILBOX="Other Users/mampf" | ||
|
||
# Due to CORS constraints, some urls are proxied to the media server | ||
DOWNLOAD_LOCATION=https://mampf.mathi.uni-heidelberg.de/mediaforward | ||
REWRITE_ENABLED=1 | ||
|
||
# Captcha Server | ||
USE_CAPTCHA_SERVICE=1 | ||
CAPTCHA_VERIFY_URL=https://captcha2go.mathi.uni-heidelberg.de/v1/verify | ||
CAPTCHA_PUZZLE_URL=https://captcha2go.mathi.uni-heidelberg.de/v1/puzzle | ||
CAPTCHA_APPLICATION_TOKEN=secret | ||
|
||
# Upload folder | ||
MEDIA_PATH=/private/media | ||
|
@@ -35,14 +44,14 @@ PRODUCTION_DATABASE_INTERACTIONS=mampf_interactions | |
PRODUCTION_DATABASE_HOST=db | ||
PRODUCTION_DATABASE_USERNAME=mampf | ||
PRODUCTION_DATABASE_PASSWORD=supersecret | ||
PRODUCTION_DATABASE_PORT=5432 | ||
PRODUCTION_DATABASE_URL='postgresql://mampf:supersecret@db:5432/mampf' | ||
PRODUCTION_DATABASE_PORT=port | ||
PRODUCTION_DATABASE_URL='postgresql://mampf:supersecret@db:port/mampf' | ||
|
||
# Rails configuration | ||
# change RAILS_ENV to production for a production deployment | ||
RAILS_ENV=production | ||
RAILS_MASTER_KEY=<rails master key> | ||
SECRET_KEY_BASE=<secret key base> | ||
RAILS_MASTER_KEY=secret | ||
SECRET_KEY_BASE=secret | ||
URL_HOST=mampf.mathi.uni-heidelberg.de | ||
URL_HOST_SHORT=http://mampf.media | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters