moving some environment variables to be aquireable at runtime to generate a mix release
This commit is contained in:
@@ -8,9 +8,7 @@
|
|||||||
import Config
|
import Config
|
||||||
|
|
||||||
config :waffle,
|
config :waffle,
|
||||||
storage: Waffle.Storage.S3,
|
storage: Waffle.Storage.S3
|
||||||
bucket: "mixer-bucket",
|
|
||||||
asset_host: "http://localhost:9000"
|
|
||||||
|
|
||||||
config :ex_aws,
|
config :ex_aws,
|
||||||
json_codec: Jason
|
json_codec: Jason
|
||||||
|
|||||||
@@ -102,3 +102,7 @@ config :ex_aws, :s3,
|
|||||||
host: "localhost",
|
host: "localhost",
|
||||||
port: 9000,
|
port: 9000,
|
||||||
virtual_host: false
|
virtual_host: false
|
||||||
|
|
||||||
|
config :waffle,
|
||||||
|
bucket: "mixer-bucket",
|
||||||
|
asset_host: "http://localhost:9000"
|
||||||
|
|||||||
@@ -72,6 +72,31 @@ if config_env() == :prod do
|
|||||||
System.get_env("TOKEN_SIGNING_SECRET") ||
|
System.get_env("TOKEN_SIGNING_SECRET") ||
|
||||||
raise("Missing environment variable `TOKEN_SIGNING_SECRET`!")
|
raise("Missing environment variable `TOKEN_SIGNING_SECRET`!")
|
||||||
|
|
||||||
|
# Configure S3-compatible storage (MinIO/Garege/AWS S3)
|
||||||
|
config :ex_aws,
|
||||||
|
access_key_id:
|
||||||
|
System.get_env("S3_ACCESS_KEY_ID") ||
|
||||||
|
raise("Missing environment variable `S3_ACCESS_KEY_ID`!"),
|
||||||
|
secret_access_key:
|
||||||
|
System.get_env("S3_SECRET_ACCESS_KEY") ||
|
||||||
|
raise("Missing environment variable `S3_SECRET_ACCESS_KEY`!")
|
||||||
|
|
||||||
|
config :ex_aws, :s3,
|
||||||
|
scheme: System.get_env("S3_SCHEME", "https://"),
|
||||||
|
host:
|
||||||
|
System.get_env("S3_HOST") ||
|
||||||
|
raise("Missing environment variable `S3_HOST`!"),
|
||||||
|
port: String.to_integer(System.get_env("S3_PORT", "80")),
|
||||||
|
virtual_host: System.get_env("S3_VIRTUAL_HOST", "false") == "true"
|
||||||
|
|
||||||
|
config :waffle,
|
||||||
|
bucket:
|
||||||
|
System.get_env("S3_BUCKET") ||
|
||||||
|
raise("Missing environment variable `S3_BUCKET`!"),
|
||||||
|
asset_host:
|
||||||
|
System.get_env("S3_ASSET_HOST") ||
|
||||||
|
raise("Missing environment variable `S3_ASSET_HOST`!")
|
||||||
|
|
||||||
# ## SSL Support
|
# ## SSL Support
|
||||||
#
|
#
|
||||||
# To get SSL working, you will need to add the `https` key
|
# To get SSL working, you will need to add the `https` key
|
||||||
|
|||||||
Reference in New Issue
Block a user