1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Active Storage: Encourage Rails.env in bucket names Part 2

Fixes #42186
This commit is contained in:
Zachary Scott 2021-05-21 08:03:47 +09:00
parent c453a5fa88
commit 333356c359

View file

@ -101,6 +101,25 @@ NOTE: Configuration files that are environment-specific will take precedence:
in production, for example, the `config/storage/production.yml` file (if existent) in production, for example, the `config/storage/production.yml` file (if existent)
will take precedence over the `config/storage.yml` file. will take precedence over the `config/storage.yml` file.
It is recommended to use `Rails.env` in the bucket names to further reduce the risk of accidentally destroying production data.
```yaml
amazon:
service: S3
# ...
bucket: your_own_bucket-<%= Rails.env %>
google:
service: GCS
# ...
bucket: your_own_bucket-<%= Rails.env %>
azure:
service: AzureStorage
# ...
container: your_container_name-<%= Rails.env %>
```
### Disk Service ### Disk Service
Declare a Disk service in `config/storage.yml`: Declare a Disk service in `config/storage.yml`: