-
Notifications
You must be signed in to change notification settings - Fork 41
Docker
Aaron W Morris edited this page Dec 13, 2023
·
45 revisions
Please ensure you have the latest docker packages installed from the Docker site. The docker build for indi-allsky requires docker compose v2.
- x86_64
- Linux
- Windows
- Mac
- arm64
- Linux
- Mac - Apple Silicon (Mac M1+)
Use the setup_env.sh
script to setup your .env environment file and ssl certificates
./setup_env.sh
- Note: in July 2023, I renamed several variables starting with
INDI_ALLSKY_
toINDIALLSKY_
for consistency.
INDIALLSKY_INDI_CCD_DRIVER=indi_simulator_ccd
INDIALLSKY_INDI_GPS_DRIVER=
INDIALLSKY_TIMEZONE=America/New_York
# This folder needs to be shared to the capture, gunicorn, and webserver containers
INDIALLSKY_IMAGE_FOLDER=/var/www/html/allsky/images
# 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=0000000000000000000000000000000000000000000000000000000000000000
INDIALLSKY_FLASK_PASSWORD_KEY=00000000000000000000000000000000000000000000
INDIALLSKY_WEB_USER=username
INDIALLSKY_WEB_PASS=password
INDIALLSKY_WEB_NAME=First Last
[email protected]
INDIALLSKY_MOSQUITTO_USER=username
INDIALLSKY_MOSQUITTO_PASS=password
# 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
INDIALLSKY_INDI_VERSION=v2.0.3
INDIALLSKY_LIBCAMERA_TAG=HEAD
INDIALLSKY_RPICAM_APPS_TAG=HEAD
INDIALLSKY_MARIADB_HOST=mariadb.indi.allsky
INDIALLSKY_MARIADB_PORT=3306
INDIALLSKY_MARIADB_SSL=false
INDIALLSKY_MARIADB_CHARSET=utf8mb4
INDIALLSKY_MARIADB_COLLATION=utf8mb4_unicode_ci
MARIADB_RANDOM_ROOT_PASSWORD=yes
MARIADB_DATABASE=indi_allsky
MARIADB_USER=indi_allsky_own
MARIADB_PASSWORD=randomlygeneratedpassword
docker compose build
docker compose up
or
docker compose up --detach
Notes
- There are delays up to 120s for services to completely start
- Your camera must be plugged in prior to starting the indiserver_indi_allsky container
docker compose down
The docker compose setup sets up a single container per process.
- indiserver.indi.allsky
- privileged container
- capture.indi.allsky
- capture process
- gunicorn.indi.allsky
- python application server
- Flask database migrations managed here
- webserver.indi.allsky
- reverse proxy
- mariadb.indi.allsky
- MariaDB database
- mosquitto.indi.allsky
- Mosquitto MQTT broker
- indi.base
- intermediate image
- does not run
- indi.allsky.base
- intermediate image
- does not run
- webserver
- 8080:80
- 8443:443
- indiserver
- 17624:7624
- gunicorn
- 8000:8000 (commented out)
- mariadb
- 13306:3306 (commented out)
- mosqutto
- 18883:8883
- 18081:8081
- images_indi_allsky
- migrations_indi_allsky (flask)
- database_indi_allsky (MariaDB)
- mosquitto_indi_allsky (Mosquitto)
-
Navigate to the current git clone
cd indi-allsky
-
Pull the latest changes via git
git pull origin main
-
Rebuild containers
-
capture.indi.allsky
-
gunicorn.indi.allsky
-
webserver.indi.allsky
docker compose build capture.indi.allsky gunicorn.indi.allsky webserver.indi.allsky
-
docker compose up mariadb.indi.allsky gunicorn.indi.allsky webserver.indi.allsky
Periodically, you may want to clean up artifacts left over by the docker build process. These commands should not result in any data loss.
- Prune images
docker image prune
- Prune volumes
docker volume prune
- Prune full system
docker system prune
- WARNING: This will delete the intermediate build layers which may require a full rebuild if you need to trigger a new build.