-
Notifications
You must be signed in to change notification settings - Fork 2
Local DSA Old Version (Forked Version)
Several public DSA servers previously used by HistoJS are no longer available. Running a local DSA instance ensures that HistoJS remains fully functional and independent of external servers.
This guide describes the exact steps used to successfully run HistoJS with a local DSA instance based on this forked repository.
Install:
sudo apt update
sudo apt install git docker.io python3-pipAdd your user to the Docker group:
sudo usermod -aG docker $USER
newgrp dockerVerify Docker:
docker --version
docker psgit clone https://github.com/Mmasoud1/digital_slide_archive.git
cd digital_slide_archive/ansibleOlder versions of DSA expect:
docker.versionto be a version string.
Modern Docker SDK versions expose:
docker.__version__instead.
Open:
ansible/deploy_docker.pyFind:
if not (LooseVersion('1.9') <= LooseVersion(docker.version)):Replace with:
if not (LooseVersion('1.9') <= LooseVersion(docker.__version__)):This modification is required for modern Python and Docker installations.
From:
cd digital_slide_archive/ansibleRun:
python3 deploy_docker.py startThe first startup may take several minutes while Docker images are downloaded and configured.
When complete, open:
http://localhost:8080
Default credentials:
Username: admin
Password: password
HistoJS communicates with DSA through the Girder API.
Without CORS enabled, browsers will block requests and HistoJS will show:
No JSON response for request
Cross-Origin Request Blocked
Access-Control-Allow-Origin missing
To fix this:
- Login as admin.
- Open:
Admin Console
→ Settings
→ Advanced Settings
- Locate:
CORS Allowed Origins
- Set:
*
- Click:
Save
After saving, HistoJS should immediately be able to communicate with DSA.
Add the local DSA endpoint:
http://localhost:8080/api/v1
Example host entry:
Name: Local DSA
Path: http://localhost:8080/api/v1
Test:
curl http://localhost:8080/api/v1/system/versionExpected output:
{
"release": "...",
"serverStartDate": "..."
}python3 deploy_docker.py stoppython3 deploy_docker.py restartpython3 deploy_docker.py rmThis removes the containers but preserves data stored in:
~/.dsa
By default DSA stores:
~/.dsa/
including:
~/.dsa/assetstore
~/.dsa/db
~/.dsa/logs
These directories should be backed up regularly.
Create a backup:
tar -czvf dsa_backup.tar.gz ~/.dsaRestore:
tar -xzvf dsa_backup.tar.gz -C ~To preserve a known working DSA installation:
docker save \
dsarchive/dsa_girder:latest \
dsarchive/dsa_worker:latest \
mongo:latest \
rabbitmq:management \
memcached:latest \
-o dsa_images.tarRestore later:
docker load -i dsa_images.tarThis guarantees future availability even if images disappear from Docker Hub.
Keep:
- Forked DSA repository.
- Docker image archive (
docker save). - ~/.dsa backup.
- This installation guide.
With these four items, a fully working HistoJS + DSA environment can be restored even if public DSA servers are no longer available.