Defining DISCOURSE_S3_CDN_URL links to assets in S3 CDN URL

bundle exec rake uploads:migrate_to_s3 will upload only attachments to S3, this task needs to be run once. After you enable S3 new uploads will be saved in the S3 buckets.

To upload assets you need to use bundle exec rake s3:upload_assets and this needs to run after every rebuild/upgrade.