diff --git a/bin/docker-start-master.sh b/bin/docker-start-master.sh index 339640fd..9c40b685 100755 --- a/bin/docker-start-master.sh +++ b/bin/docker-start-master.sh @@ -1,4 +1,16 @@ -#!/bin/bash +# replace base url +if [ "${CRAWLAB_BASE_URL}" = "" ]; +then + : +else + indexpath=/app/dist/index.html + sed -i "s?/js/?${CRAWLAB_BASE_URL}/js/?g" ${indexpath} + sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath} + + sed -i "s/ > /var/log/weed.log 2>&1 & + diff --git a/docker-compose.yml b/docker-compose.yml index 7454342a..cad1a694 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ services: image: crawlabteam/crawlab:latest container_name: crawlab_master environment: + CRAWLAB_BASE_URL: crawlab CRAWLAB_SERVER_MASTER: Y CRAWLAB_MONGO_HOST: mongo ports: