Chapter 4

Deploy to Production

Configure your API key for production

Your API key needs to be available in production. This covers the two most common approaches: environment variables and Rails credentials.

Environment variables

Set the OGPLUS__API_KEY environment variable on your hosting platform.

Fly.io

fly secrets set OGPLUS__API_KEY=$OGPLUS__API_KEY

Heroku

heroku config:set OGPLUS__API_KEY=$OGPLUS__API_KEY

Render

render env:set OGPLUS__API_KEY=$OGPLUS__API_KEY

Railway

railway variables set OGPLUS__API_KEY=$OGPLUS__API_KEY

Docker

docker run -e OGPLUS__API_KEY=$OGPLUS__API_KEY your-image

Rails credentials

If you’re using Rails credentials, ensure your production credentials include the opengraphplus.api_key value. See the Rails credentials documentation for setup details.