Skip to content

Commit

Permalink
Merge pull request GeoNode#1 from camptocamp/switch_to_https
Browse files Browse the repository at this point in the history
Switch to https
  • Loading branch information
Vampouille authored Jun 20, 2017
2 parents 42fea37 + d11051e commit 50ce201
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 15 deletions.
22 changes: 21 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,33 @@ EXPOSE 8000
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["django-admin.py", "runserver", "0.0.0.0:8000", "--settings=geonode.settings"]

# Install gunicorn
RUN pip install gunicorn

# Install tools for frontend (node, npm, grunt, bower, ...)
ADD https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-x64.tar.xz /usr/local/
RUN cd /usr/local/ \
&& wget https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-x64.tar.xz \
&& tar Jxvf node-v6.10.3-linux-x64.tar.xz \
&& rm node-v6.10.3-linux-x64.tar.xz \
&& ln -s node-v6.10.3-linux-x64 node \
&& cd /usr/local/bin \
&& ln -s /usr/local/node-v6.10.3-linux-x64/bin/node \
&& ln -s /usr/local/node-v6.10.3-linux-x64/bin/npm \
&& npm install npm@latest -g \
&& npm install -g bower \
&& npm install -g grunt
ENV PATH=/usr/local/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Install geonode code and dependencies
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app/
RUN pip install --no-cache-dir --no-deps -e /usr/src/app/
RUN pip install --no-cache-dir --no-deps -e /usr/src/app/ \
&& cd /usr/src/app/geonode/static \
&& grunt production

# Install geonode configuration
RUN mkdir -p /mnt/geonode_data/uploaded /mnt/geonode_data/static /mnt/geonode_config \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ up:
docker-compose up -d

build:
docker pull python:2.7.9
docker pull python:2.7
docker build -t camptocamp/geonode_django:latest .
docker build -t camptocamp/geonode_django:`date +%Y%m%d%H%M%S` .

Expand Down
26 changes: 13 additions & 13 deletions geonode/static/geonode/js/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
if(node.nodes){
for(var i=0; i<node.nodes.length;i++){
$('#treeview').treeview('selectNode', node.nodes[i]);
}
}
}
},
onNodeUnselected: function($event, node){
Expand All @@ -81,7 +81,7 @@
for(var i=0; i<node.nodes.length;i++){
$('#treeview').treeview('unselectNode', node.nodes[i]);
$('#treeview').trigger('nodeUnselected', $.extend(true, {}, node.nodes[i]));
}
}
}
}
});
Expand Down Expand Up @@ -206,7 +206,7 @@
// module.load_keywords($http, $rootScope, $location);
//}
module.load_h_keywords($http, $rootScope, $location);

if ($('#regions').length > 0){
module.load_regions($http, $rootScope, $location);
}
Expand Down Expand Up @@ -249,7 +249,7 @@
$scope.query.limit = $scope.query.limit || CLIENT_RESULTS_LIMIT;
$scope.query.offset = $scope.query.offset || 0;
$scope.page = Math.round(($scope.query.offset / $scope.query.limit) + 1);

//Get data from apis and make them available to the page
function query_api(data){
$http.get(Configs.url, {params: data || {}}).success(function(data){
Expand Down Expand Up @@ -350,7 +350,7 @@
query_entry.push($scope.query[data_filter]);
}
}

// Add the entry in the correct query
if (query_entry.indexOf(value) == -1){
query_entry.push(value);
Expand All @@ -377,7 +377,7 @@
query_entry.push($scope.query[data_filter]);
}
}

query_entry.splice(query_entry.indexOf(value), 1);

//save back the new query entry to the scope query
Expand Down Expand Up @@ -588,12 +588,12 @@
layers: {
baselayers: {
stamen: {
name: 'Toner Lite',
name: 'OpenStreetMap Mapnik',
type: 'xyz',
url: 'http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png',
url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
layerOptions: {
subdomains: ['a', 'b', 'c'],
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>',
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
continuousWorld: true
}
}
Expand All @@ -609,7 +609,7 @@
}
});


var leafletData = $injector.get('leafletData'),
map = leafletData.getMap('filter-map');

Expand All @@ -619,15 +619,15 @@
query_api($scope.query);
});
});

var showMap = false;
$('#_extent_filter').click(function(evt) {
showMap = !showMap
showMap = !showMap
if (showMap){
leafletData.getMap().then(function(map) {
map.invalidateSize();
});
}
}
});
}
});
Expand Down

0 comments on commit 50ce201

Please sign in to comment.