Skip to content

Commit

Permalink
Merge pull request #3844 from camptocamp/upgrade
Browse files Browse the repository at this point in the history
Upgrade..., see commits
  • Loading branch information
sbrunner authored Jun 21, 2018
2 parents 40c7be4 + a02a1cd commit 05b56c4
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ update_paths:
- docker_services.geoportal.environment
- docker_services.tilecloudchain.environment
- fulltextsearch
- functionalities.available_in_templates
- interfaces_theme
- shortener

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ GIT_REMOTE_URL ?= [email protected]:camptocamp/{{package}}.git
DEPLOY_BRANCH_BASE_URL ?= $(VISIBLE_PROTOCOL)://$(VISIBLE_HOST)
DEPLOY_BRANCH_MAKEFILE ?= {{package}}.mk

DEV_SERVER_PORT ?= 8081
export DEV_SERVER_PORT

ifeq ($(FINALISE), TRUE)
include nondocker-finalise.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ update_paths:
- docker_services.geoportal.environment
- docker_services.tilecloudchain.environment
- fulltextsearch
- functionalities.available_in_templates
- interfaces_theme
- shortener

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ vars:
tinyowsproxy:
tinyows_url: http://localhost/{instanceid}/tinyows
print_url: http://localhost:8080/print-{instanceid}/print/{package}
devserver_url: http://localhost:{DEV_SERVER_PORT}/{instanceid}/wsgi/
pdfreport:
print_url: http://localhost:8080/print-{instanceid}/print/{package}
servers:
Expand Down Expand Up @@ -90,3 +91,4 @@ environment:
- PRINT_URL
- EXTERNAL_PYTHON_VERSION_MAJOR
- EXTERNAL_PYTHON_VERSION_MINOR
- DEV_SERVER_PORT
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ GEOMAPFISH_VERSION ?= {{geomapfish_version}}
export GEOMAPFISH_VERSION
export PACKAGE = {{package}}

DEV_SERVER_PORT ?= 8081
export DEV_SERVER_PORT

INSTANCE ?= main
export INSTANCE

Expand Down Expand Up @@ -602,6 +599,7 @@ $(APP_OUTPUT_DIR)/images/: /usr/lib/node_modules/jquery-ui/themes/base/images
$(APP_OUTPUT_DIR)/images/
$(PRERULE_CMD)
# Workaround to make Webpack working for ol/index.js
rm --force geoportal/node_modules
ln --symbolic /usr/lib/node_modules/ geoportal/
(cd geoportal; INTERFACE=$* webpack $(WEBPACK_ARGS))
rm geoportal/node_modules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ vars:
host: '{VISIBLE_WEB_HOST}'
web_protocol: '{VISIBLE_WEB_PROTOCOL}'
entry_point: '{VISIBLE_ENTRY_POINT}'
dev_server_port: '{DEV_SERVER_PORT}'
docker_entry_point: '{DOCKER_ENTRY_POINT}'
docker_host: '{DOCKER_WEB_HOST}'
docker_web_protocol: '{DOCKER_WEB_PROTOCOL}'
Expand Down Expand Up @@ -540,7 +539,6 @@ environment:
- WMTSCAPABILITIES_PATH
- BUILD_VOLUME_NAME
- PROJECT_DIRECTORY
- DEV_SERVER_PORT
- INSTANCE

runtime_environment:
Expand Down
5 changes: 4 additions & 1 deletion geoportal/c2cgeoportal_geoportal/views/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from pyramid.httpexceptions import HTTPFound
from pyramid.view import view_config
import re
import os

logger = logging.getLogger(__name__)

Expand All @@ -44,12 +45,14 @@ class Dev(Proxy):
def __init__(self, request):
super().__init__(request)
self.dev_url = self.request.registry.settings['devserver_url']
if 'VISIBLE_ENTRY_POINT' in os.environ:
self.dev_url = self.dev_url.replace('${VISIBLE_ENTRY_POINT}', os.environ['VISIBLE_ENTRY_POINT'])

@view_config(route_name='dev')
def dev(self):
path = self.THEME_RE.sub('', self.request.path_info)
if self.request.path.endswith('/dynamic.js'):
return HTTPFound(location=self.request.route_url('dynamic'))
return HTTPFound(location=self.request.route_url('dynamic'), _query=self.request.params)
else:
return self._proxy_response('dev', "{}/{}".format(
self.dev_url.rstrip('/'), path.lstrip('/')
Expand Down

0 comments on commit 05b56c4

Please sign in to comment.