Ubuntu搭建Nightscout服务器
简单的几行代码就可以架设自己的ns服务器了!!!
点击腾讯云以后会看到50元的服务器
选50元的配置 扫码登陆 认证 下单 时选择Ubuntu20 或者Ubuntu 22
安装Docker
复制命令到命令行
sudo apt-get update
sudo apt-get install docker.io -y
sudo apt-get install docker-compose -y
nightscout/cgm-remote-monitor:latest
然后拉取Nightscout包和设置Nightscout
编辑docker-compose.yml文件
vi docker-compose.yml
version: "3.3"
services:
nightscout:
image: liske/cgm-remote-monitor:14.0.6
environment:
TZ: Asia/Shanghai
MONGO_CONNECTION: mongodb://mongo:27017/nightscout
API_SECRET: zZ1234567891
BG_HIGH: 220
BG_LOW: 60
BG_TARGET_TOP: 180
BG_TARGET_BOTTOM: 80
INSECURE_USE_HTTP: "true"
BASE_URL: ns.tantouok.com
AUTH_DEFAULT_ROLES: readable devicestatus-upload
PUMP_FIELDS: reservoir battery status
ENABLE: bridge loop openaps pump iob cob basal careportal sage cage delta direction devicestatus upbat timeago
CUSTOM_TITLE: 糖++
DISPLAY_UNITS: mmol
TIME_FORMAT: 24
THEME: colors
LANGUAGE: zh_cn
BASAL_RENDER: default
SHOW_PLUGINS: pump openaps
ports:
- "18888:1337"
links:
- mongo
restart: always
mongo:
image: mongo:3.6-stretch
volumes:
- ./mongodb:/data/db
restart: always
运行启动:
sudo service docker restart
sudo apt-get install docker.io
sudo docker-compose up -d