Defining DISCOURSE_S3_CDN_URL links to assets in S3 CDN URL

Wait
I don’t understand one thing.

Why set up this data in ENV ?

I’ll give my example.

By setting the data in admin panels to S3 everything works properly and everything loads to S3. I do not have any settings in ENV. Is that bad ? Is it necessary if everything works ?

The second example is different because I can’t migrate the old data to S3 (only new ones work) But here entering this data in app.yml (DISCOURSE_S3_ACCESS_KEY_ID: ‘key’ etc) file doesn’t change anything and it still doesn’t work (i.e.

rake uploads:migrate_to_s3

does not work

Can you explain that to me?