Skip to content
Snippets Groups Projects
Commit f805a5e6 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

added docker and export script

parents
No related branches found
No related tags found
No related merge requests found
FROM nginx
#!/bin/bash
if [ -z ${RUST_CLASS_ROOT+x} ]; then echo "RUST_CLASS_ROOT is unset"; else echo "var is set to '$RUST_CLASS_ROOT'"; fi
if [ -z ${SL_CLASS_ROOT+x} ]; then echo "SL_CLASS_ROOT is unset"; else echo "var is set to '$SL_CLASS_ROOT'"; fi
if [ -z ${MTI_CLASS_ROOT+x} ]; then echo "MTI_CLASS_ROOT is unset"; else echo "var is set to '$MTI_CLASS_ROOT'"; fi
## declare classes directories
declare -a arr=("$RUST_CLASS_ROOT" "$SL_CLASS_ROOT" "$MTI_CLASS_ROOT")
## now loop through the above array
for i in "${arr[@]}"
do
echo "Deploying $i"
## pull them
git -C $i pull
## deploy
make deploy -C $i
done
docker stop rustclass
docker build -t rustclasscont .
docker run --rm \
--mount src=$RUST_CLASS_ROOT/prog_seq,target=/usr/share/nginx/html/prog_seq/,type=bind\
--mount src=$SL_CLASS_ROOT/sol,target=/usr/share/nginx/html/sol/,type=bind\
--mount src=$MTI_CLASS_ROOT/mti,target=/usr/share/nginx/html/mti/,type=bind\
--name rustclass -p 80:80 -p 443:443 -d rustclasscont
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment