# SatNOGS DB Fork This lesser fork is for exploring the SatNOGS DB. * https://spacecruft.org/spacecruft/satnogs-db # Install Dependencies Using Debian Stable (Bullseye/11). ``` sudo apt install git libmariadb-dev mariadb-server npm python3-pip sqlite3 virtualenvwrapper ``` # Repo setup I setup my `git` repo thusly. ``` git clone git@spacecruft.org:spacecruft/satnogs-db.git cd satnogs-db git remote add upstream https://gitlab.com/librespacefoundation/satnogs/satnogs-db.git git fetch upstream git checkout remotes/upstream/master git branch spacecruft git checkout spacecruft git push --set-upstream origin spacecruft # set to default branch in gitea ``` # Setup Set up the environment. To use `virtualenvwrapper`, you need to add it to the PATH. The easiest way is to just add this like to the end of `~/.bashrc`. ``` source /usr/share/virtualenvwrapper/virtualenvwrapper.sh ``` Then log out and back in or just re-source the file. This will enable the `mkvirtualenv` and `workon` commands. ``` cd satnogs-db mkvirtualenv satnogs-db -a . pip install --upgrade pip cp env-dist .env ``` Then edit the `.env` file to add `ALLOWED_HOSTS` for remote acccess on LAN. Use IP address of *server*. ``` ALLOWED_HOSTS='192.168.1.100' ``` # Front End Dependencies Install front end. Each command takes one minute or so to run. ``` npm install ./node_modules/.bin/gulp ``` # Populate Database Run thusly: ``` workon satnogs-db # if you aren't already in the environment ./bin/djangoctl.sh develop . ``` Set up database in another terminal, when above command is ready and listening on port 8000: ``` cd satnogs-db workon satnogs-db ./bin/djangoctl.sh initialize ``` # Access May need to open firewall on server, `TCP/8000`. # Use In web browser go to server IP, port 8000. http://192.168.1.1:8000/ Log in with super user created above when initializing. It will verify email address. Look in the output of the terminal running the django command above for the URL to validate the email address (assuming no email is actually used). # Upstream See upstream `README-upstream.md`. * https://db.satnogs.org/ * https://gitlab.com/librespacefoundation/satnogs/satnogs-db.git * https://docs.satnogs.org/projects/satnogs-db/en/stable/