|
1 | 1 | import Config |
2 | 2 |
|
3 | | -# Note we also include the path to a cache manifest |
4 | | -# containing the digested version of static files. This |
5 | | -# manifest is generated by the `mix assets.deploy` task, |
6 | | -# which you should run after static files are built and |
7 | | -# before starting your production server. |
8 | | -config :safira, SafiraWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json" |
| 3 | +config :logger, :console, format: "[$level] $message\n" |
9 | 4 |
|
10 | | -# Configures Swoosh API Client |
11 | | -config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: Safira.Finch |
| 5 | +config :waffle, |
| 6 | + storage: Waffle.Storage.S3, |
| 7 | + bucket: {:system, "AWS_S3_BUCKET"}, |
| 8 | + asset_host: {:system, "ASSET_HOST"} |
12 | 9 |
|
13 | | -# Disable Swoosh Local Memory Storage |
14 | | -config :swoosh, local: false |
| 10 | +config :ex_aws, |
| 11 | + json_codec: Jason, |
| 12 | + access_key_id: {:system, "AWS_ACCESS_KEY_ID"}, |
| 13 | + secret_access_key: {:system, "AWS_SECRET_ACCESS_KEY"}, |
| 14 | + region: {:system, "AWS_REGION"}, |
| 15 | + s3: [ |
| 16 | + scheme: "https://", |
| 17 | + host: {:system, "ASSET_HOST"}, |
| 18 | + region: {:system, "AWS_REGION"}, |
| 19 | + access_key_id: {:system, "AWS_ACCESS_KEY_ID"}, |
| 20 | + secret_access_key: {:system, "AWS_SECRET_ACCESS_KEY"} |
| 21 | + ] |
15 | 22 |
|
16 | | -# Do not print debug messages in production |
17 | | -config :logger, level: :info |
| 23 | +config :swoosh, :api_client, Swoosh.ApiClient.Hackney |
18 | 24 |
|
19 | | -# Runtime production configuration, including reading |
20 | | -# of environment variables, is done on config/runtime.exs. |
| 25 | +config :safira, Safira.Mailer, adapter: Swoosh.Adapters.ExAwsAmazonSES |
| 26 | + |
| 27 | +# ## SSL Support |
| 28 | +# |
| 29 | +# To get SSL working, you will need to add the `https` key |
| 30 | +# to the previous section and set your `:url` port to 443: |
| 31 | +# |
| 32 | +config :safira, Safira.Endpoint, |
| 33 | + url: [scheme: "https", host: System.get_env("PHX_HOST") || "stg.seium.org", port: 443], |
| 34 | + force_ssl: [rewrite_on: [:x_forwarded_proto]], |
| 35 | + cache_static_manifest: "priv/static/cache_manifest.json" |
0 commit comments