From e57c1e83a8010129265a9a76fc1f22c5a104f5b0 Mon Sep 17 00:00:00 2001
From: Nico Vermaas <vermaas@astron.nl>
Date: Tue, 15 Dec 2020 08:01:55 +0100
Subject: [PATCH] add documentation

---
 README.md                 | 25 +++++++++++++++++++++++--
 atdb/atdb/settings/dev.py |  3 ++-
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 2827f059..faeee5c1 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,21 @@
 
 ### Apertif Task Database for LOFAR Data Valorization
 
+Test Environment:
+  * https://sdc.astron.nl:5554/atdb/
+  * https://sdc.astron.nl:5554/atdb/admin/
+
+### Confluence
 Confluence Page:
   * https://support.astron.nl/confluence/display/LDV/LOFAR+Data+Valorization+Home
 
-#### Diagrams (under construction)
-These are still mostly the original ATDB diagrams. They will be adapted and kept in sync once the ATDB-LDV structure solifies a bit more.
+Workflow:
+This diagram roughly serves as the specs for adapting ATDB for LDV.
+  * https://support.astron.nl/confluence/display/LDV/WORKFLOW
+
+#### Overview Diagrams (under construction)
+These diagrams are the core of the ATDB documentation.
+Currently they are still mostly the original ATDB diagrams. They will be adapted and kept in sync once the ATDB-LDV structure solifies a bit more.
 
 Context Diagram:
   * https://drive.google.com/file/d/1ltmzFMgOI24kIgPtaKrYl-j__ATOI3m6/view?usp=sharing
@@ -21,12 +31,23 @@ Deployment Diagram:
   * https://drive.google.com/file/d/1_j9Fp505pZTxcmzAEdgftdPkoIFrKfAX/view?usp=sharing
   
 ### Manual deploy in Docker
+#### initial
+
+    > cd ~/my_docker
+    > cd atdb-ldv
+    > git clone https://git.astron.nl/astron-sdc/atdb-ldv.git
+
+#### update:
+
     > export DOCKER_BUILD_DIR=$HOME/my_docker/atdb-ldv/atdb-ldv/atdb
     > export DOCKER_COMPOSE_DIR=$DOCKER_BUILD_DIR/docker
     > cd $DOCKER_COMPOSE_DIR
     > docker-compose -p atdb up -d
     
 ### Database migrations
+When the `models.py` is changed, then the database must be migrated.
+This is how to do that manually for a persistent database in a Docker container.
+
     > docker exec -it atdb-ldv python manage.py makemigrations --settings atdb.settings.docker_sdc
     > docker exec -it atdb-ldv python manage.py migrate --settings atdb.settings.docker_sdc    
     
diff --git a/atdb/atdb/settings/dev.py b/atdb/atdb/settings/dev.py
index 42802f61..e6f7892a 100644
--- a/atdb/atdb/settings/dev.py
+++ b/atdb/atdb/settings/dev.py
@@ -39,7 +39,8 @@ DATABASES = {
 
          # database runs locally in postgres
          # 'NAME': 'atdb_trunk',
-         'NAME': 'atdb_04oct2019',
+         #'NAME': 'atdb_04oct2019',
+         'NAME': 'atdb_ldv',
          'HOST': 'localhost',
          'PORT': '',
 
-- 
GitLab