Commit 50ef1555 authored by ismael.rodriguez's avatar ismael.rodriguez

Adding Dockerfile

parent c63469e7
FROM ubuntu:14.04.1
MAINTAINER ismael.rodriguez
RUN apt-get update && apt-get install -y python-scipy
RUN apt-get update && apt-get install -y apache2 libapache2-mod-wsgi
RUN apt-get update && apt-get install -y git
RUN git clone https://gitlab.citius.usc.es/ismael.rodriguez/stac.git
RUN mkdir /var/www/stac
RUN cp -R stac/api stac/web stac/stac /var/www/stac
RUN chmod -R 755 /var/www
ADD stac.conf /etc/apache2/sites-enabled/000-default.conf
EXPOSE 80
CMD /usr/sbin/apache2ctl -D FOREGROUND
<VirtualHost *:80>
ServerName stac
ServerAlias stac
ServerAdmin ismael.rodriguez@usc.es
DocumentRoot /var/www/stac/web
<Directory /var/www/stac/web>
Order deny,allow
Allow from all
</Directory>
WSGIDaemonProcess stac user=www-data group=www-data processes=1 threads=1
WSGIScriptAlias /api /var/www/stac/api/app.wsgi
<Directory /var/www/stac/api>
WSGIProcessGroup stac
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
APP_CONFIG={
app_url : window.location.href.substring(0, window.location.href.lastIndexOf('/')),
api_url : window.location.href.substring(0, window.location.href.lastIndexOf('/')) + '/api'
}
......@@ -10,7 +10,7 @@ $(document).ready(function() {
else {
$.ajax({
type: "POST",
url: window.location.origin+"/stac/api/file",
url: APP_CONFIG.api_url + "/file",
dataType: "json",
data: formData,
cache: false,
......@@ -27,7 +27,7 @@ $(document).ready(function() {
$("#show_file").show();
$('#info_file').html("Done!");
window.location = "/stac/file.html";
window.location = app_url + "/file.html";
} else{
resultado = resultado + "<p style=\"color:red\";><strong>" + data.fallo + "</strong></p>";
$('#info_file').html("<br>"+resultado);
......@@ -51,7 +51,7 @@ function show_file() {
$.ajax({
type: "GET",
url: window.location.origin+"/stac/api/file/"+hash,
url: APP_CONFIG.app_url + "/file/"+hash,
success : function(data) {
if(data.fallo) {
$("#danger").html("There is no file uploaded.").show();
......
......@@ -36,11 +36,13 @@ loadStyle("css/bootstrap.min.css");
loadStyle("css/dashboard.css");
loadScript("js/jquery.min.js", function() {
loadScript("js/bootstrap.min.js");
loadScript("js/layout.js");
loadScript("js/behavior.js");
loadScript("js/file_manager.js");
loadScript("js/tests.js");
loadScript("js/export.js");
loadScript("js/config.js", function() {
loadScript("js/bootstrap.min.js");
loadScript("js/layout.js");
loadScript("js/behavior.js");
loadScript("js/file_manager.js");
loadScript("js/tests.js");
loadScript("js/export.js");
})
});
......@@ -8,9 +8,9 @@ $(document).ready(function(){
var test = $('input[name=test]:checked').val();
var alpha = $('#alpha').val();
var url = window.location.origin+"/stac/api/"+test+"/"+sessionStorage.getItem("data")+"/"+alpha;
var url = APP_CONFIG.api_url+"/"+test+"/"+sessionStorage.getItem("data")+"/"+alpha;
var post_hoc = $('input[name=post_hoc]:checked').val();
if (post_hoc) var url = window.location.origin+"/stac/api/"+test+"/"+sessionStorage.getItem("data")+"/"+alpha+"/"+post_hoc;
if (post_hoc) var url = APP_CONFIG.api_url+"/"+test+"/"+sessionStorage.getItem("data")+"/"+alpha+"/"+post_hoc;
console.log(url);
switch (type) {
......
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