From be61a3bd996f21a2b273b7c64d84b6378af55c52 Mon Sep 17 00:00:00 2001
From: Daniel K Lyons <dlyons@nrao.edu>
Date: Thu, 8 Apr 2021 13:15:51 -0600
Subject: [PATCH] Configure the local environment so that files wind up in
 /var/www and are served properly by nginx

---
 apps/web/ws-nginx.local.conf | 4 ++--
 docker-compose.yml           | 2 ++
 docker.properties            | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/apps/web/ws-nginx.local.conf b/apps/web/ws-nginx.local.conf
index 05c4f3edb..fe2bce14d 100644
--- a/apps/web/ws-nginx.local.conf
+++ b/apps/web/ws-nginx.local.conf
@@ -20,10 +20,10 @@ server {
     }
 
     location ~ ^/dl/(?:(.*))/(?:(.*)) {
-        alias /tmp/workspaces_tmp/$1/$2;
+        alias /var/www/$1/$2;
         autoindex on;
         autoindex_exact_size off;
         autoindex_format html;
         autoindex_localtime on;
     }
-}
\ No newline at end of file
+}
diff --git a/docker-compose.yml b/docker-compose.yml
index 37bb75a87..a62adda7b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -11,6 +11,7 @@ services:
     volumes: 
       - ./apps/web/ws-nginx.local.conf:/etc/nginx/conf.d/default.conf
       - ./tmp/:/tmp/workspaces_tmp
+      - ./delivery_root:/var/www
   db:
     image: marconi.aoc.nrao.edu/ops/ci/db:workspaces
     restart: always
@@ -50,6 +51,7 @@ services:
       - ./apps:/packages/apps
       - ./testing:/packages/testing
       - ./tmp/:/tmp/workspaces_tmp
+      - ./delivery_root:/var/www
 
   capability:
     build:
diff --git a/docker.properties b/docker.properties
index 2fdd1798f..2cf9667e0 100644
--- a/docker.properties
+++ b/docker.properties
@@ -23,7 +23,8 @@ edu.nrao.archive.workspaces.ProcessingSettings.useCondor = false
 #
 # Delivery settings
 #
-edu.nrao.archive.workflow.config.DeliverySettings.nraoDownloadDirectory = /root/downloads
+edu.nrao.archive.workflow.config.DeliverySettings.nraoDownloadDirectory = /var/www
+edu.nrao.archive.workflow.config.DeliverySettings.nraoDownloadUrl = http://localhost:4444/dl
 
 #
 # Data fetcher settings
-- 
GitLab