mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-18 09:02:41 +00:00
This commit is contained in:
parent
1ea0afea54
commit
d8563606c5
|
@ -50,6 +50,8 @@ These are the config keys you should especially pay attention to:
|
|||
- POSTGRES_PASSWORD
|
||||
- MEILI_MASTER_KEY
|
||||
|
||||
WARNING: If you want to store uploads in an object storage rather than directly on your server (which you probably want, to not run out of space), you need to configure that up front, otherwise URLs will break if you change it later. The relevant keys are UPLOADS_S3_BUCKET and the related API key and secret. See `config/runtime.exs` for extra variables to set if you're not using the default service and region (which is [Scaleway](https://www.scaleway.com/en/object-storage/) Paris).
|
||||
|
||||
You can use `just secrets` to generate some random secret keys to use.
|
||||
|
||||
And in public.env:
|
||||
|
|
|
@ -206,7 +206,7 @@ end
|
|||
|
||||
## bonfire_files
|
||||
|
||||
if System.get_env("UPLOADS_S3_BUCKET") && System.get_env("UPLOADS_ACCESS_KEY_ID") && System.get_env("UPLOADS_S3_SECRET_ACCESS_KEY") do
|
||||
if System.get_env("UPLOADS_S3_BUCKET") && System.get_env("UPLOADS_S3_ACCESS_KEY_ID") && System.get_env("UPLOADS_S3_SECRET_ACCESS_KEY") do
|
||||
IO.puts(
|
||||
"Note: uploads will be stored in s3: #{System.get_env("UPLOADS_S3_HOST")}"
|
||||
)
|
||||
|
@ -228,7 +228,7 @@ if System.get_env("UPLOADS_S3_BUCKET") && System.get_env("UPLOADS_ACCESS_KEY_ID"
|
|||
|
||||
config :ex_aws,
|
||||
json_codec: Jason,
|
||||
access_key_id: System.get_env("UPLOADS_ACCESS_KEY_ID"),
|
||||
access_key_id: System.get_env("UPLOADS_S3_ACCESS_KEY_ID"),
|
||||
secret_access_key: System.get_env("UPLOADS_S3_SECRET_ACCESS_KEY"),
|
||||
region: region,
|
||||
s3: [
|
||||
|
|
|
@ -38,3 +38,7 @@ WEB_PUSH_PRIVATE_KEY=abc
|
|||
GEOLOCATE_OPENCAGEDATA=
|
||||
GITHUB_TOKEN=xyz
|
||||
|
||||
# Uploads
|
||||
# UPLOADS_S3_BUCKET=
|
||||
# UPLOADS_S3_ACCESS_KEY_ID=
|
||||
# UPLOADS_S3_SECRET_ACCESS_KEY=
|
||||
|
|
Loading…
Reference in a new issue