Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host as docker container #58

Open
kristianbendren opened this issue Feb 18, 2023 · 1 comment
Open

Host as docker container #58

kristianbendren opened this issue Feb 18, 2023 · 1 comment

Comments

@kristianbendren
Copy link

Hi,
[i'm quite new to docker but would it be possible to host this on your own server using docker container?
If so, would someone be able to put together a docker-compose.yml file that could be used?

Would be a great way to be able to host it yourself.

@kristianbendren
Copy link
Author

Managed to fix it myself.

You need to have a docker registry and I use the Synology running my own docker registry on my synology following this guide
https://dev.to/kedzior_io/setup-a-docker-registry-on-synolgy-aia

Then I host the nightscout using traefik to get https (let me know if you need assistance on that).

Here is the DockerFile for the bridge

`

Create build image

FROM node:latest

ENV DEXCOM_ACCOUNT_NAME=
ENV DEXCOM_PASSWORD=
ENV API_SECRET=
ENV WEBSITE_HOSTNAME=
ENV BRIDGE_SERVER=EU

Create app directory

WORKDIR /app

Install app dependencies

A wildcard is used to ensure both package.json AND package-lock.json are copied

where available (npm@5+)

COPY ./share2nightscout-bridge/package*.json ./

RUN npm install

If you are building your code for production

RUN npm ci --only=production

Bundle app source

COPY ./share2nightscout-bridge .

CMD [ "node", "index.js" ]`

and here is the the Docker-Compose file

`version: '3.2'

services:
nightscout-bridge:
image: YOURREGISYRURLHERE/nightscout/bridge:latest

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant