Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly setup Active Storage #945

Open
ACPK opened this issue Oct 17, 2018 · 2 comments
Open

Properly setup Active Storage #945

ACPK opened this issue Oct 17, 2018 · 2 comments
Labels
Enhancement Features we're considering adding

Comments

@ACPK
Copy link

ACPK commented Oct 17, 2018

Line #11 in config/environments/production reads:

  config.active_storage.service = :local

With the Heroku setup, shouldn't there be an ENV variable here so users can set it to a third-party service (ex: AWS)?

@delphaber
Copy link
Contributor

You are right. :local would not work on Heroku.

I think it would be a good idea to use an ENV variable even if the app is not set up on heroku.

# in .env
ACTIVE_STORAGE_SERVICE='local'
# in config/environments/production.rb
config.active_storage.service = ENV.fetch('ACTIVE_STORAGE_SERVICE', :local).to_sym

@thiagoa thiagoa changed the title active_storage Properly setup Active Storage Oct 1, 2021
@stevepolitodesign
Copy link
Contributor

The latest release made an effort to rely on as much as rails new as possible, and to push any infrastructure decisions to the consumer, since we no longer default to hosting on Heroku.

That being said, I don't think there would ever be a case where we'd want to store files locally in production.

@stevepolitodesign stevepolitodesign added the Enhancement Features we're considering adding label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Features we're considering adding
Projects
None yet
Development

No branches or pull requests

3 participants