-
Notifications
You must be signed in to change notification settings - Fork 526
Deploy to Heroku
Setting up the Share to Nightscout bridge on Heroku is very easy whether you have an existing Nightscout website or not. You can setup the bridge to work with a Nightscout website hosted by Azure, Heroku, or anywhere else. Heroku is a web hosting service like Windows Azure, however they structure usage and billing differently.
Note: Heroku pricing has changed. Dynos costs $7 a month for 24/7 usage. Dynos are free if they sleep 6 hours a day.
You will perform the following steps to deploy the Share to Nightscout bridge on Heroku.
- Setup a Heroku account (if necessary)
- Deploy a Nightscout website (if necessary)
- Deploy a Nightscout bridge
- Verify operation
Skip this step if you already have a Heroku account.
- Browse to Heroku and sign up for an account.
- Once logged into Heroku, click on your username in the top left of the Heroku Dashboard, then click "Manage Account."
- Click "Billing" Add a credit card for payment information. You should not be charged for running a Nightscout website or bridge, but you need payment information on file before you deploy any apps.
Skip this step if you already have a Nightscout website setup on Heroku or Azure that you wish to use for the bridge.
If you need a Nightscout website for the bridge, follow the general steps below. For detailed instructions, you can look at the Nightscout Heroku lab.
-
Login to your GitHub account. If you don't have a GitHub account, create one.
-
Fork a copy of cgm-remote-monitor to your GitHub account.
- If you are doing this for the first time, you may find the Github Step section helpful from the Nightscout setup guide.
- If you already have a copy of cgm-remote-monitor, you do not need to fork a copy. Use the Update My Fork tool to verify you have the most recent sources for the
Master
branch and update as necessary.)
-
From your copy of cgm-remote-monitor on GitHub, click the purple Deploy to Heroku button in the README.
-
On the Heroku deploy screen, enter an app name for your website.
-
Enter a 12 character password for the
API_SECRET
variable. Note: Your API_SECRET value must be at least 12 characters. (You do not need to fill in any of the other variables.) -
Scroll down and click the purple Deploy for Free button.
-
After your website has deployed, click the View It link at the bottom of the page to verify that you see a Nightscout website with no data (e.g., a site with a black screen that shows the time on the left and dashes on the right).
-
Login to your GitHub account. If you don't have a GitHub account, create one.
-
Fork a copy of share2nightscout-bridge to your GitHub account.
-
From your copy of share2nightscout-bridge on GitHub, click on the purple Deploy to Heroku button.
-
On the Heroku deploy screen, enter an app name for your bridge.
-
Enter the
API_SECRET
used for your Nightscout website. -
Enter your Dexcom Sharer username as the
DEXCOM_ACCOUNT_NAME
variable. -
Enter your Dexcom Sharer password as the
DEXCOM_PASSWORD
variable. -
Enter your Nightscout website hostname as the
WEBSITE_HOSTNAME
variable. Do not include http:// or https://. Do not include / at the end. -
Scroll down and click the purple Deploy for Free button.
-
After your bridge has deployed, click the Make your first edit link at the bottom of the page. (Note: If you do not see a Make your first edit link, but instead see a link to Manage App, click that.)
-
Click on the Resources tab, then press the Edit button to the right of where it says "Dynos".
-
Slide the slider from 0 to 1 dyno, then press Save.
Nightscout requires at least three value BG readings to display data. If you are deploying a brand new website with your bridge, expect to wait 15 minutes before you see data. If you're re-using an existing website that has recent BG data, you may only need to wait a few minutes. Once you verify that your website is showing current data, you are done.
See the README for details about additional variables you can set to control how your bridge operates.