jwoglom / tconnectsync

Syncs data from Tandem Source (formerly t:connect) to Nightscout for the t:slim X2 and Mobi insulin pumps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Dump useful info upon startup to stdout; read in command line parameters via environmental variables

ariana-wolfkiel opened this issue · comments

Features for Docker environments that don't allow changes to the execution command

Synology (and others?) doesn't let you change the execution command once the container is created. The only way to change the execution command is to delete the container and create a new one.

So, upon boot up, write useful stuff to stdout so that we can leave the execution command alone. Useful info that could be dumped:
--version
--check-login

Other command line parameters could be read in as environmental variables, like:
--auto-update <yes|no>
--features
--start-date
--days
--verbose
Or do it with a single environmental variable. Something like: COMMAND_LINE_PARAMETERS

I discovered that exporting the .json file modifying it with updated command line parameters and then importing again was easier than I thought. So, this isn't a much of a priority. Doing it this way does recreate the container but there is nothing that is stored. Everything is read in via environmental variables.

@ariana-wolfkiel Would you mind sharing how you were able to get command-line parameters to be used via environment variables? Looking to add "start-date" and "auto-update" because I'm using docker-compose.