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

removed useless files now that publication is automatic

parent a8cc6133
No related branches found
No related tags found
No related merge requests found
FROM nginx
COPY site/index.html /usr/share/nginx/html/
COPY site/css /usr/share/nginx/html/css
RUN rm /usr/share/nginx/html/50x.html
#!/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
if [ -z ${RUST_EXERCICES_ROOT+x} ]; then echo "RUST_EXERCICES_ROOT is unset"; else echo "var is set to '$RUST_EXERCICES_ROOT'"; fi
if [ -z ${CONC_ROOT+x} ]; then echo "CONC_ROOT is unset"; else echo "var is set to '$CONC_ROOT'"; fi
## declare classes directories
declare -a arr=("$RUST_CLASS_ROOT" "$SL_CLASS_ROOT" "$MTI_CLASS_ROOT" "$RUST_EXERCICES_ROOT" "$CONC_ROOT" "$(pwd)")
## 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
echo "$(pwd)"/site/
rsync -avz index.html malaspinas@129.194.185.180:/www/
rsync -avz $RUST_CLASS_ROOT/prog_seq malaspinas@129.194.185.180:/www/
rsync -avz $SL_CLASS_ROOT/sol malaspinas@129.194.185.180:/www/
rsync -avz $MTI_CLASS_ROOT/mti malaspinas@129.194.185.180:/www/
rsync -avz $CONC_ROOT/concurrence malaspinas@129.194.185.180:/www/
# 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