Commit 45aea987 authored by James Laver's avatar James Laver

Merge branch 'chore/cleanup-config' into 'develop'

Chore/cleanup config

See merge request !17
parents a50712b7 83cc9896
Pipeline #65701665 passed with stages
in 9 minutes and 56 seconds
......@@ -45,7 +45,7 @@ RUN npm run-script deploy
##################3
FROM deps-getter as builder
ENV HOME=/opt/app/ TERM=xterm MIX_ENV=prod
ENV HOME=/opt/app/ TERM=xterm MIX_ENV=prod APPSIGNAL_BUILD_FOR_MUSL=1
WORKDIR $HOME
......
......@@ -30,8 +30,8 @@ config :mime, :types, %{
config :moodle_net, MoodleNet.Mailer,
adapter: Bamboo.MailgunAdapter, # replace this with the email deliver service adapter you want to use: https://github.com/thoughtbot/bamboo#available-adapters
api_key: Application.get_env(:moodle_net, :mail_key) || System.get_env("MAIL_KEY"), # use API key from runtime environment variable (make sure to set it on the server or CI config), and fallback to build-time env variable
domain: Application.get_env(:moodle_net, :mail_domain) || System.get_env("MAIL_DOMAIN"), # use sending domain from runtime env, and fallback to build-time env variable
api_key: System.get_env("MAIL_KEY"), # use API key from runtime environment variable (make sure to set it on the server or CI config), and fallback to build-time env variable
domain: System.get_env("MAIL_DOMAIN"), # use sending domain from runtime env, and fallback to build-time env variable
open_email_in_browser_url: "http://localhost:4000/sent_emails" # optional
version =
......
......@@ -10,4 +10,5 @@ REPLACE_OS_VARS=true
ERLANG_COOKIE=moodle_net_cookie
AP_BASE_URL=http://localhost:4000/activity_pub
MAIL_DOMAIN=mailg.moodle.net
MAIL_KEY=123
\ No newline at end of file
MAIL_KEY=123
APPSIGNAL_BUILD_FOR_MUSL=1
HOSTNAME=localhost
SECRET_KEY_BASE="U1QXlca4ZEZKb1o3HL/aUlznI1qstCNAQ6yme/lFbFIs0Iqiq/annZ+Ty8JyUCDc"
DATABASE_HOST=postgres
DATABASE_HOST=db
DATABASE_USER=postgres
DATABASE_PASS=postgres
DATABASE_NAME=moodle_net_prod
POSTGRES_DB=moodle_net_prod
PORT=4000
LANG=en_US.UTF-8
REPLACE_OS_VARS=true
ERLANG_COOKIE=moodle_net_cookie
AP_BASE_URL=http://localhost:4000/activity_pub
MAIL_DOMAIN=mailg.moodle.net
#MAIL_KEY=123
\ No newline at end of file
MAIL_KEY=123
\ No newline at end of file
......@@ -23,5 +23,6 @@ config :moodle_net, MoodleNetWeb.Endpoint,
config :moodle_net, :ap_base_url, env.("AP_BASE_URL")
config :moodle_net, :mail_domain, env.("MAIL_DOMAIN")
config :moodle_net, :mail_key, env.("MAIL_KEY")
config :moodle_net, MoodleNet.Mailer,
domain: env.("MAIL_DOMAIN"),
api_key: env.("MAIL_KEY")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment