summaryrefslogtreecommitdiffstats
path: root/run/config.sh
diff options
context:
space:
mode:
authorEvelina Ametova <evelina@ipecompute4.ands.kit.edu>2022-05-29 17:03:27 +0200
committerEvelina Ametova <evelina@ipecompute4.ands.kit.edu>2022-05-29 17:03:27 +0200
commitd4f8c2c238342bf3adfa236c49ff43eecd018201 (patch)
tree150e0ed08554acb47d8093e389729614ced159b2 /run/config.sh
parenta3f93ec6436d64f515546ceefe394a79e0552b13 (diff)
downloadccpi-d4f8c2c238342bf3adfa236c49ff43eecd018201.tar.gz
ccpi-d4f8c2c238342bf3adfa236c49ff43eecd018201.tar.bz2
ccpi-d4f8c2c238342bf3adfa236c49ff43eecd018201.tar.xz
ccpi-d4f8c2c238342bf3adfa236c49ff43eecd018201.zip
Configure volumes and support 'fast' storage
Diffstat (limited to 'run/config.sh')
-rw-r--r--run/config.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/run/config.sh b/run/config.sh
index 048ecfb..f3bdecb 100644
--- a/run/config.sh
+++ b/run/config.sh
@@ -1,8 +1,14 @@
+user="$(id -un)"
+home="/home/$user"
port="$(($(id -u)%100 + 100))"
ssh_port="${port}22"
web_port="${port}80"
+
image="$1"
[ -n "$image" ] || image="tomo-remote" # tomo-remote:latest tomo-remote:devel (also ccpi, ufo, tomo)
+volumes="-v $home/ccpi/data:/ccpi/data -v $home/ccpi/repos:/ccpi/repos"
+[ -d /mnt/fast/$user ] && volumes="$volumes -v /mnt/fast/$user:/ccpi/data/fast"
+
echo "Image: $image, Ports: $ssh_port, $web_port"