From 1e579f8588db3bdcc30f9a7723c36c490f5b7f67 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Wed, 13 Dec 2023 12:55:08 -0600 Subject: [PATCH 1/5] adjust optional module install --- setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index a0754e6ae..215565cd4 100755 --- a/setup.sh +++ b/setup.sh @@ -68,6 +68,8 @@ WEB_PASS="${INDIALLSKY_WEB_PASS:-}" WEB_NAME="${INDIALLSKY_WEB_NAME:-}" WEB_EMAIL="${INDIALLSKY_WEB_EMAIL:-}" +OPTIONAL_PYTHON_MODULES="${INDIALLSKY_OPTIONAL_PYTHON_MODULES:-false}" + PYINDI_2_0_4="git+https://github.com/indilib/pyindi-client.git@6f8fa80#egg=pyindi-client" PYINDI_2_0_0="git+https://github.com/indilib/pyindi-client.git@674706f#egg=pyindi-client" PYINDI_1_9_9="git+https://github.com/indilib/pyindi-client.git@ce808b7#egg=pyindi-client" @@ -1893,7 +1895,7 @@ pip3 install --upgrade pip setuptools wheel pip3 install -r "${ALLSKY_DIRECTORY}/${VIRTUALENV_REQ}" -if [ -n "${OPTIONAL_PYTHON_MODULES:-}" ]; then +if [ "${OPTIONAL_PYTHON_MODULES}" == "true" ]; then pip3 install -r "${ALLSKY_DIRECTORY}/${VIRTUALENV_REQ_OPT}" fi From bb451030cc25624c6a3e76af2d73c93787f014e5 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Wed, 13 Dec 2023 14:37:44 -0600 Subject: [PATCH 2/5] Enable dark frame capture in containers --- docker/env_template | 15 +++++++++++---- docker/start_indi_allsky.sh | 16 +++++++++++++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/docker/env_template b/docker/env_template index 5e5b7cfe9..a1e08ad71 100644 --- a/docker/env_template +++ b/docker/env_template @@ -10,13 +10,19 @@ INDIALLSKY_INDI_GPS_DRIVER= # This folder needs to be shared to the capture, gunicorn, and nginx containers INDIALLSKY_IMAGE_FOLDER=/var/www/html/allsky/images -INDIALLSKY_FLASK_AUTH_ALL_VIEWS=false -INDIALLSKY_FLASK_SECRET_KEY=%INDIALLSKY_FLASK_SECRET_KEY% -INDIALLSKY_FLASK_PASSWORD_KEY=%INDIALLSKY_FLASK_PASSWORD_KEY% +# Set to "true" (without quotes) to take dark frames instead of normal image capture +INDIALLSKY_DARK_CAPTURE_ENABLE=false +INDIALLSKY_DARK_CAPTURE_MODE=sigmaclip +INDIALLSKY_DARK_CAPTURE_BITMAX=16 +INDIALLSKY_DARK_CAPTURE_DAYTIME=--daytime # Folder for temporary files in capture process. Uncomment to activate #CAPTURE_TMPDIR=/tmp +INDIALLSKY_FLASK_AUTH_ALL_VIEWS=false +INDIALLSKY_FLASK_SECRET_KEY=%INDIALLSKY_FLASK_SECRET_KEY% +INDIALLSKY_FLASK_PASSWORD_KEY=%INDIALLSKY_FLASK_PASSWORD_KEY% + INDIALLSKY_WEB_USER=%WEB_USER% INDIALLSKY_WEB_PASS=%WEB_PASS% INDIALLSKY_WEB_NAME=%WEB_NAME% @@ -25,7 +31,8 @@ INDIALLSKY_WEB_EMAIL=%WEB_EMAIL% INDIALLSKY_MOSQUITTO_USER=%WEB_USER% INDIALLSKY_MOSQUITTO_PASS=%WEB_PASS% -# remember to set back to false after first run +# Set to "true" (without quotes) to generate a users API key +# remember to set back to "false" after first run INDIALLSKY_WEB_GENERATE_APIKEY=false # Only used on the debian build diff --git a/docker/start_indi_allsky.sh b/docker/start_indi_allsky.sh index f322a316d..198c93c73 100755 --- a/docker/start_indi_allsky.sh +++ b/docker/start_indi_allsky.sh @@ -144,7 +144,17 @@ fi # start the program -./allsky.py \ - --log stderr \ - run +if [ "${INDIALLSKY_DARK_CAPTURE_ENABLE:-false}" == "true" ]; then + # take dark frames + echo "Starting dark frame capture" + ./darks.py \ + --bitmax "${INDIALLSKY_DARK_CAPTURE_BITMAX:-16}" \ + "${INDIALLSKY_DARK_CAPTURE_DAYTIME:-}" \ + "${INDIALLSKY_DARK_CAPTURE_MODE:-average}" +else + # normal capture + ./allsky.py \ + --log stderr \ + run +fi From 4bd56ef0cfe4adb30a7f606e88888eae19ee3799 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Wed, 13 Dec 2023 14:40:23 -0600 Subject: [PATCH 3/5] increment recommended indi version to v2.0.5 --- README.md | 4 ++-- docker/env_template | 2 +- misc/build_indi.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 151615343..21395a988 100644 --- a/README.md +++ b/README.md @@ -104,9 +104,9 @@ https://github.com/aaronwmorris/indi-allsky/wiki/FAQ ## INDI support | Version | Note | | --------------- | ---- | -| v2.0.5 | Requires upgrade to indi-allsky v7.7 | +| v2.0.5 | **Recommended**
Requires upgrade to indi-allsky v7.7 | | v2.0.4 | [Typo in indibash.h prevents building pyindi-client](https://github.com/aaronwmorris/indi-allsky/wiki/INDI-2.0.4-bug)
Svbony support is broken | -| v2.0.3 | **Recommended** | +| v2.0.3 | | | v2.0.2 | | | v2.0.1 | | diff --git a/docker/env_template b/docker/env_template index a1e08ad71..472cbb023 100644 --- a/docker/env_template +++ b/docker/env_template @@ -36,7 +36,7 @@ INDIALLSKY_MOSQUITTO_PASS=%WEB_PASS% INDIALLSKY_WEB_GENERATE_APIKEY=false # Only used on the debian build -INDIALLSKY_INDI_VERSION=v2.0.3 +INDIALLSKY_INDI_VERSION=v2.0.5 INDIALLSKY_LIBCAMERA_TAG=HEAD INDIALLSKY_RPICAM_APPS_TAG=HEAD diff --git a/misc/build_indi.sh b/misc/build_indi.sh index efe19d5d9..d57adf170 100755 --- a/misc/build_indi.sh +++ b/misc/build_indi.sh @@ -20,7 +20,7 @@ if [ -n "${1:-}" ]; then INDI_CORE_TAG="$1" INDI_3RDPARTY_TAG=$INDI_CORE_TAG else - INDI_CORE_TAG="v2.0.3" + INDI_CORE_TAG="v2.0.5" INDI_3RDPARTY_TAG=$INDI_CORE_TAG fi From 3d6939a396c6175ac093024cea3e20da6eb1b0d8 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Wed, 13 Dec 2023 14:44:31 -0600 Subject: [PATCH 4/5] message update --- docker/start_indi_allsky.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/start_indi_allsky.sh b/docker/start_indi_allsky.sh index 198c93c73..d332a07d7 100755 --- a/docker/start_indi_allsky.sh +++ b/docker/start_indi_allsky.sh @@ -147,7 +147,7 @@ fi if [ "${INDIALLSKY_DARK_CAPTURE_ENABLE:-false}" == "true" ]; then # take dark frames - echo "Starting dark frame capture" + echo "*** Starting dark frame capture ***" ./darks.py \ --bitmax "${INDIALLSKY_DARK_CAPTURE_BITMAX:-16}" \ "${INDIALLSKY_DARK_CAPTURE_DAYTIME:-}" \ From 92fe14c6ab57771cf6fecd4f6213402f97e88a69 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Wed, 13 Dec 2023 14:59:40 -0600 Subject: [PATCH 5/5] ensure python cryptography module is installed --- docker/setup_env.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/setup_env.sh b/docker/setup_env.sh index 95ceef53b..3b5b3be21 100755 --- a/docker/setup_env.sh +++ b/docker/setup_env.sh @@ -17,6 +17,11 @@ cd "$OLDPWD" if [ ! -f "${DOCKER_DIRECTORY}/.env" ]; then + sudo true + sudo apt-get update + sudo apt-get -f install \ + python3-cryptography + INDIALLSKY_FLASK_SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())') INDIALLSKY_FLASK_PASSWORD_KEY=$(python3 -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())')