Commit e51662ee authored by Mikaël Salson's avatar Mikaël Salson Committed by Mikaël Salson

docker/vidjil-client/: Link to conf files rather than copy.

This allows to modify the configurations without rebuilding the image

See #3941
parent bac84808
Pipeline #85755 passed with stages
in 10 minutes and 47 seconds
......@@ -299,7 +299,6 @@ test_server_functional:
- sed -i '/\/etc\/nginx\/ssl\:\/etc\/nginx\/ssl/d' ./docker/docker-compose.yml
- sed -i 's/\:latest/\:test/g' ./docker/docker-compose.yml
- cd docker/vidjil-server/conf/ && mv defs.py defs_https.py && mv defs_http.py defs.py && cd ../../..
- cd docker/vidjil-client/conf/ && mv conf.js conf_https.js && mv conf_http.js conf.js && cd ../../..
- make germline && cp browser/js/germline.js docker/vidjil-client/conf
- cd docker && docker-compose up -d && cd ..
- sed -i "s/^python\ \.\.\/\.\.\/\.\./docker\ exec\ docker_uwsgi_1\ python\ \/usr\/share\/vidjil\/server\/web2py/" server/web2py/applications/vidjil/tests/init_func_test_db.sh
......
......@@ -13,14 +13,7 @@ arg git_branch=dev
arg remote_repo=https://gitlab.inria.fr/vidjil/vidjil.git
run cd /usr/share/ && git config --global http.sslVerify false && git clone -b $git_branch $remote_repo
copy ./conf/nginx_gzip_static.conf /etc/nginx/conf.d/web2py/gzip_static.conf
copy ./conf/nginx_gzip.conf /etc/nginx/conf.d/web2py/gzip.conf
copy ./conf/uwsgi.conf /etc/nginx/conf.d/web2py/uwsgi.conf
add ./scripts/install.sh /opt/install_scripts/install.sh
copy ./conf/conf.js /opt/vidjil_conf/conf.js
copy ./conf/conf_http.js /opt/vidjil_conf/conf_http.js
copy ./conf/nginx_web2py /opt/vidjil_conf/web2py
copy ./conf/nginx_web2py_http /opt/vidjil_conf/web2py_http
copy ./conf/Gemfile /usr/share/vidjil/Gemfile
copy ./conf/align.cgi /usr/share/vidjil/browser/cgi/align.cgi
copy ./conf/similarity.cgi /usr/share/vidjil/browser/cgi/similarity.cgi
......@@ -31,9 +24,12 @@ arg build_env='PRODUCTION'
env BUILD_ENV $build_env
run mkdir /etc/vidjil
run mkdir /etc/nginx/conf.d/web2py/
run rm /etc/nginx/conf.d/default.conf
run chmod +x /opt/install_scripts/install.sh; sync && /opt/install_scripts/install.sh
run ln -s /etc/vidjil/conf.js /usr/share/vidjil/browser/js/conf.js
run ln -s /etc/vidjil/nginx_gzip_static.conf /etc/nginx/conf.d/web2py/gzip_static.conf
run ln -s /etc/vidjil/nginx_gzip.conf /etc/nginx/conf.d/web2py/gzip.conf
run ln -s /etc/vidjil/uwsgi.conf /etc/nginx/conf.d/web2py/uwsgi.conf
run ln -s /etc/vidjil/germline.js /usr/share/vidjil/browser/js/germline.js
copy ./scripts/nginx-entrypoint.sh /entrypoints/nginx-entrypoint.sh
......
#!/bin/bash
echo "${BUILD_ENV}"
if [ "${BUILD_ENV}" = "TEST" ]; then
cp -avr /opt/vidjil_conf/conf_http.js /etc/vidjil/conf.js
cp -avr /opt/vidjil_conf/web2py_http /etc/nginx/conf.d/web2py.conf
ln -s /etc/vidjil/conf_http.js /usr/share/vidjil/browser/js/conf.js
ln -s /etc/vidjil/nginx_web2py_http /etc/nginx/conf.d/web2py.conf
else
cp -avr /opt/vidjil_conf/conf.js /etc/vidjil/conf.js
cp -avr /opt/vidjil_conf/web2py /etc/nginx/conf.d/web2py.conf
ln -s /etc/vidjil/conf.js /usr/share/vidjil/browser/js/conf.js
ln -s /etc/vidjil/nginx_web2py /etc/nginx/conf.d/web2py.conf
fi;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment