This is the User Interface of the Siding Spring Observatory's Alert System. This project uses Docker Compose to set up a
reverse proxy with Nginx Proxy Manager, a web application, and a PostgreSQL database. Each service is defined within the
docker-compose.yml
file, ensuring a modular and scalable setup.
- Manages reverse proxy settings and SSL certificates.
- Exposes:
- Port
81
for the admin interface. - Port
80
for HTTP traffic. - Port
443
for HTTPS traffic.
- Port
- Stores configuration and SSL data in mounted volumes.
- Runs a web application built from the local directory.
- Connects to the PostgreSQL database.
- Exposes port
8080
for external access. - Environment variables configure the database connection.
- Provides a database backend for the web application.
- Exposes port
5432
for database access. - Stores persistent data in a local volume.
In addition to the services described above, the system employs two cron jobs to read streams and update submitted observation status. These jobs run management commands inside the Docker container at specified intervals and log the output for monitoring.
This cron job runs every 5 minutes and executes the readstreams
management command.
This cron job runs every 2 hours and executes the updatestatus
management command.
To run the prototype locally, please follow the below instructions.
cd <repo_location>
git clone --recursive [email protected]:CAS-eResearch/external/sso-alert/ui.git
python3 -m venv <env_name>
source <env_name>/bin/activate
python3 -m pip install -r ui/requirements.txt
cd ui/sso_tom
python manage.py runserver
The project will now be available at http://localhost:8000/
There are some steps which could be followed by the IT people to make sure the application is running smoothly.
- Ensure that cron jobs are running as expected by checking the logs generated by the scripts (
readstreams
andupdatestatus
). Logs are stored in date-based subdirectories to facilitate monitoring. - Review logs periodically for any signs of errors, failures, or abnormal behavior. Any issues in the cron jobs should be investigated immediately to avoid potential disruptions in application functionality.
Not necessarily. The application will be able to run smoothly after restarting even if you don't do the backup.
- Regularly back up essential data, i.e., the PostgreSQL database to prevent data loss. Automated and secured backups should be scheduled if possible.
- Use volume mounts in Docker to ensure data persistence across container restarts. For example, the PostgreSQL data is stored in a mounted volume, which should be backed up as part of the disaster recovery plan.
The PostgreSQL service stores its data in the following volume mount - ./postgresql/data:/var/lib/postgresql/data
-
This is where the actual PostgreSQL database files are stored. All database records, schemas, and configurations are
stored here.
PostgreSQL Data (./postgresql/data
): This directory contains the full database for your application. It is essential
to back this up regularly, as it stores all the critical data required for the application's operation.
- Stay up-to-date with security patches for both the Docker containers (e.g., Nginx, PostgreSQL) and the application
dependencies. Regularly update images used in the
docker-compose.yml
file to their latest stable versions to incorporate security fixes. - If required, you can update the
tom-toolkit
that is used under the hood of the web application, however, it could potentially lead to various errors in the extended UI components which need to be fixed in the UI code. - Ensure that SSL certificates managed by Nginx Proxy Manager are renewed automatically.
- Monitor the database size and storage utilization, especially in the mounted volumes.