Skip to content

Commit

Permalink
fix: Adding ex_aws config in runtime so it works properly. #69
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Jul 11, 2023
1 parent 18af780 commit f48f346
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ config :logger, :console,
# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason

config :ex_aws,
access_key_id: System.get_env("AWS_ACCESS_KEY_ID"),
secret_access_key: System.get_env("AWS_SECRET_ACCESS_KEY"),
region: System.get_env("AWS_REGION"),
original_bucket: System.get_env("AWS_S3_BUCKET_ORIGINAL"),
compressed_bucket: System.get_env("AWS_S3_BUCKET_COMPRESSED"),
request_config_override: %{}

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
Expand Down
3 changes: 3 additions & 0 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ if config_env() == :prod do
],
secret_key_base: secret_key_base

# https://github.com/dwyl/imgup/issues/68
config :ex_aws,
access_key_id: System.get_env("AWS_ACCESS_KEY_ID"),
secret_access_key: System.get_env("AWS_SECRET_ACCESS_KEY"),
region: System.get_env("AWS_REGION"),
original_bucket: System.get_env("AWS_ORIGINAL_BUCKET"),
compressed_bucket: System.get_env("AWS_COMPRESSED_BUCKET"),
request_config_override: %{}
end

0 comments on commit f48f346

Please sign in to comment.