docbrown/Envfile
Ridhwana e74890680a
Generalize meta content and copyright year (#6887)
* chore: remove the description

* feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently

* refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>

* refactor: update the path to be dynamic

* refactor: change some other meta properties to be dynamic

* refactor: update the index

* refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community

* feat: copyright year should be dynamic

* feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url

* feat: space

* refactor: move the copyright notice to a helper

* refactor: use the community_qualified_name helper!

* refactor: start year is already a string

* refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere

* chore:oops

* refactor: Change  <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently.

* refactor: Replace  `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with `  <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />`

* chore: update some other meta's

* feat: replace 'The Practical DEV' with 'DEV Community' and

* test: remove The :)

* test: copyright_notice

* fix: syntax error

* feat: name of community

* refactor: use app url

* fix: template strings

* fix: tag

* feat: update the app url parameters

* feat: add a community_name helper so we don't have to refer to an environment variable in the templates

* feat: take into account the case when the start year is a blank string

* feat: single quotes to double quotes

* test: add a test for the #community_name

* chore: update or codeclimate

* chore: amend the community helper

* refactor: use the community_name helper in here

* feat: update ApplicationConfig["COMMUNITY_NAME"]  with community_name

* fix: Time.current.year needs to be a string :(

* chore: extra space

* chore: change to use community_qualified_name
2020-03-31 16:15:57 +02:00

187 lines
7.2 KiB
Text

# Most of the things are optional. If you need to use a
# custom key, please create an application.yml for it
enable_defaults! { ENV["RACK_ENV"] != "production" }
################################################
############## Basic configuration #############
################################################
# App domain + Protocol setting for development
variable :APP_DOMAIN, :String, default: "localhost:3000"
variable :APP_PROTOCOL, :String, default: "http://"
# Community Related Variables
variable :COMMUNITY_COPYRIGHT_START_YEAR, :String, default: "2016"
variable :COMMUNITY_NAME, :String, default: "DEV(local)"
# Service timeout length
variable :RACK_TIMEOUT_WAIT_TIMEOUT, :Integer, default: 100_000
variable :RACK_TIMEOUT_SERVICE_TIMEOUT, :Integer, default: 100_000
# Heroku release slug used to bust caches on deploys
variable :HEROKU_SLUG_COMMIT, :String, default: "Optional"
# Redis caching storage
variable :REDIS_URL, :String, default: "redis://localhost:6379"
# Redis sessions storage
variable :REDIS_SESSIONS_URL, :String, default: "redis://localhost:6379"
variable :SESSION_KEY, :String, default: "_Dev_Community_Session"
variable :SESSION_EXPIRY_SECONDS, :Integer, default: 1209600 # two weeks in seconds
# Redis Sidekiq storage
variable :REDIS_SIDEKIQ_URL, :String, default: "redis://localhost:6379"
# Elasticsearch
variable :ELASTICSEARCH_URL, :String, default: "http://localhost:9200"
################################################
############## 3rd Party Services ##############
################################################
# It's best if you have the following configured
# for more development experience
# Github for github related access
# (https://developer.github.com/v3/guides/basics-of-authentication/)
variable :GITHUB_KEY, :String, default: "Optional"
variable :GITHUB_SECRET, :String, default: "Optional"
# Twitter for normal twitter access
# (https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens)
variable :TWITTER_KEY, :String, default: "Optional"
variable :TWITTER_SECRET, :String, default: "Optional"
################################################
######### Optional 3rd Party Services ##########
################################################
# Honeybadger for error tracking
# (https://docs.honeybadger.io/lib/ruby/getting-started/introduction.html)
variable :HONEYBADGER_API_KEY, :String, default: "Optional"
variable :HONEYBADGER_JS_API_KEY, :String, default: "Optional"
# Algolia for search (not optional)
# (https://www.algolia.com/doc/)
only_in_test = proc { ENV["RACK_ENV"] == "test" ? "test-test" : nil }
variable :ALGOLIASEARCH_API_KEY, :String, default: only_in_test
variable :ALGOLIASEARCH_APPLICATION_ID, :String, default: only_in_test
variable :ALGOLIASEARCH_SEARCH_ONLY_KEY, :String, default: only_in_test
# AWS for images storages
variable :AWS_ID, :String, default: "Optional"
variable :AWS_SECRET, :String, default: "Optional"
variable :AWS_BUCKET_NAME, :String, default: "Optional"
variable :AWS_UPLOAD_REGION, :String, default: ""
# AWS SDK
# (https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/setup-config.html)
variable :AWS_DEFAULT_REGION, :String, default: "us-east-1"
variable :AWS_SDK_KEY, :String, default: "Optional"
variable :AWS_SDK_SECRET, :String, default: "Optional"
# AWS for video storage
variable :AWS_S3_INPUT_BUCKET, :String, default: "Optional"
variable :AWS_S3_VIDEO_ID, :String, default: "Optional"
variable :AWS_S3_VIDEO_KEY, :String, default: "Optional"
# Buffer for sending to buffer
# (https://buffer.com/developers/api)
variable :BUFFER_ACCESS_TOKEN, :String, default: "Optional"
variable :BUFFER_FACEBOOK_ID, :String, default: "Optional"
variable :BUFFER_LINKEDIN_ID, :String, default: "Optional"
variable :BUFFER_PROFILE_ID, :Integer, default: 0
variable :BUFFER_TWITTER_ID, :String, default: "Optional"
variable :BUFFER_LISTINGS_PROFILE, :String, default: "Optional"
# Cloudinary for image resizing and cache??
# (https://cloudinary.com/documentation/rails_integration)
variable :CLOUDINARY_API_KEY, :String, default: "Optional"
variable :CLOUDINARY_API_SECRET, :String, default: "Optional"
variable :CLOUDINARY_CLOUD_NAME, :String, default: "Optional"
variable :CLOUDINARY_SECURE, :String, default: "Optional"
# HTML/CSS to Image for generating social preview images
# (https://docs.htmlcsstoimage.com/example-code/ruby)
variable :HCTI_API_USER_ID, :String, default: "Optional"
variable :HCTI_API_KEY, :String, default: "Optional"
# Fastly for edge caching
# (https://docs.fastly.com/api/)
variable :FASTLY_API_KEY, :String, default: "Optional"
variable :FASTLY_SERVICE_ID, :String, default: "Optional"
# Honeycomb for monitoring and observability
# (https://www.honeycomb.io/)
variable :HONEYCOMB_API_KEY, :String, default: ""
# Google analytic
# (https://developers.google.com/analytics/devguides/reporting/core/v4)
variable :GA_SERVICE_ACCOUNT_JSON, :String, default: "Optional"
variable :GA_TRACKING_ID, :String, default: "Optional"
# Mailchimp for mails
# (https://mailchimp.com/developer/)
variable :MAILCHIMP_API_KEY, :String, default: "Optional-valid"
# Pusher for DEV Connect/notfications
# (https://pusher.com/docs)
variable :PUSHER_APP_ID, :String, default: "Optional"
variable :PUSHER_CLUSTER, :String, default: "Optional"
variable :PUSHER_KEY, :String, default: "Optional"
variable :PUSHER_SECRET, :String, default: "Optional"
variable :PUSHER_BEAMS_ID, :String, default: "Optional"
variable :PUSHER_BEAMS_KEY, :String, default: "Optional"
# Google recaptcha
# (https://developers.google.com/recaptcha/intro)
variable :RECAPTCHA_SECRET, :String, default: "Optional"
variable :RECAPTCHA_SITE, :String, default: "Optional"
# Slack for customer alerts
# (https://api.slack.com/)
variable :SLACK_CHANNEL, :String, default: ""
variable :SLACK_DEPLOY_CHANNEL, :String, default: ""
variable :SLACK_WEBHOOK_URL, :String, default: ""
# Stripe for payment system
# (https://stripe.com/docs/api)
variable :STRIPE_PUBLISHABLE_KEY, :String, default: "Optional"
variable :STRIPE_SECRET_KEY, :String, default: "Optional"
# For video calling in DEV Connect
# (https://www.twilio.com/docs/video)
variable :TWILIO_ACCOUNT_SID, :String, default: "Optional"
variable :TWILIO_VIDEO_API_KEY, :String, default: "Optional"
variable :TWILIO_VIDEO_API_SECRET, :String, default: "Optional"
# For Twitch live stream integration
# (https://dev.twitch.tv/docs)
variable :TWITCH_CLIENT_ID, :String, default: "Optional"
variable :TWITCH_CLIENT_SECRET, :String, default: "Optional"
variable :TWITCH_WEBHOOK_SECRET, :String, default: "Optional"
# For calling the Stack Exchange API
# (https://api.stackexchange.com/docs)
variable :STACK_EXCHANGE_APP_KEY, :String, default: ""
# For setting the IDs of the staff and welcoming users
variable :STAFF_USER_ID, :Integer, default: 1
group :production do
variable :SECRET_KEY_BASE, :String
# Timber
# (https://docs.timber.io/)
variable :SEND_LOGS_TO_TIMBER, :String # Defaults to true in production, false in development
variable :TIMBER, :String # Only required if above is "true" or unset
# Sendgrid
# (https://sendgrid.com/docs/API_Reference/api_v3.html)
variable :SENDGRID_USERNAME_ACCEL, :String
variable :SENDGRID_PASSWORD_ACCEL, :String
# Heroku
variable :HEROKU_APP_URL, :String # practicaldev.herokuapp.com
end