Commit d97fdd12 authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

switch to path-based url

parent 9f2d5c2f
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ after_script:
build-airsans-image:
  stage: build
  variables:
    TAG: "0.1"
    TAG: "0.2"
    FORCE_TAGS: "false"
  when: manual
  script:
+14 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ RUN conda config --add channels conda-forge
RUN conda create -n trame python=3.10
RUN conda install -n trame mantid

RUN conda uninstall -n trame vtk
#RUN conda uninstall -n trame vtk

SHELL ["conda", "run", "-n", "trame", "/bin/bash", "-c"]

@@ -14,9 +14,21 @@ COPY --chown=trame-user:trame-user . /app
WORKDIR app

RUN pip install -r requirements.txt
#RUN pip uninstall -y vtk
RUN pip uninstall -y vtk
RUN pip install --extra-index-url https://wheels.vtk.org vtk-egl


RUN apt update && apt install -y nginx
RUN chmod og+rwX -R /var/lib/nginx
RUN chmod og+rwX -R /var/log/nginx
RUN chmod og+rwX -R /etc/nginx

COPY .deploy/nginx.conf.template /etc/nginx/nginx.conf.template
COPY .deploy/prepare_nginx.sh /

RUN python -m trame.tools.www --client-type vue2 --output /app/www-content


USER trame-user

ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "trame"]
+47 −0
Original line number Diff line number Diff line
pid        /tmp/nginx.pid;

events {
    worker_connections  1024;
}


http {
    client_body_temp_path /tmp/client_temp;
    proxy_temp_path       /tmp/proxy_temp_path;
    fastcgi_temp_path     /tmp/fastcgi_temp;
    uwsgi_temp_path       /tmp/uwsgi_temp;
    scgi_temp_path        /tmp/scgi_temp;

    include       mime.types;

    default_type  application/octet-stream;

    sendfile        on;


    keepalive_timeout  65;


    server {
        listen       8081;
        server_name  localhost;


        location ${EP_PATH}/ws {
            proxy_pass   http://localhost:8080/ws;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
            proxy_set_header Host $host;
            proxy_socket_keepalive on;
	    proxy_connect_timeout 120;
	    proxy_send_timeout 360;
	    proxy_read_timeout 360;
        }

       location ${EP_PATH} {
           alias /app/www-content/;
       }

    }
}
+2 −0
Original line number Diff line number Diff line
envsubst '$EP_PATH' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
nginx