[FOLIO-897] Avoid external port 9130 in full-stack boxes: folio/stable, folio/testing Created: 15/Oct/17  Updated: 21/May/21  Resolved: 21/May/21

Status: Closed
Project: FOLIO
Components: Continuous Integration
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: Julian Ladisch Assignee: Florian Gleixner
Resolution: Done Votes: 0
Labels: ci, platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks FOLIO-1134 Secure public AWS instances Open
Duplicate
is duplicated by FOLIO-1849 Proxy Okapi through standard HTTP/HTT... Closed
Relates
relates to RMB-247 OkapiUrl with scheme and path in Http... Open
relates to RMB-244 OkapiUrl with path in ConfigurationsC... Closed
relates to OKAPI-653 Document that X-Okapi-Url may end wit... Closed
relates to STCOR-29 Re-organise the webpack configuration Closed
relates to STRIPES-177 Investigate pre-flight OPTIONS calls ... Closed
Sprint:
Development Team: Core: Platform

 Description   

Change the full-stack boxes folio/stable and folio/testing so that they can be run on a single host and on the single standard port 80 (or 443 when using https).

Several libraries have strict firewall settings where ports like 9130 are blocked. To make demoing and testing FOLIO as easy as possible the full-stack boxes should come with a default installation with front end and back end on the same port (80 or 443). (The option to configure other hostnames and ports can still remain.)

Having frontend and backend on the same hostname and port has the additional benefit that the browser doesn't send any Cross-Origin Resource Sharing (CORS) preflight requests; there may be some locations where this significantly reduces the latency.



 Comments   
Comment by Julian Ladisch [ 15/Oct/17 ]

For https://folio-demo.gbv.de/ I've put nginx in front of folio/stable with this configuration:

# bootstrap directory
location /bootstrap {
        proxy_pass http://127.0.0.1:3000;
}

# some files in root directory:
# index file at / and favicon.ico and all bundle/chunk files
location ~ ^(/|/favicon\.ico|/([0-9]+\.)?(bundle|chunk)(\.[0-9a-f]+)?\.js)$ {
        proxy_pass http://127.0.0.1:3000;
}

location / {
        proxy_pass http://127.0.0.1:9130;
}

Note that a path like /groups need to be routed to 9130.
The regexp is a hack.

A more simple solution is possible if stripes moves its files into a subdirectory like html:

# index file at / and favicon.ico and the html directory
location ~ ^(/|/favicon\.ico|/html/.*)$ {
        proxy_pass http://127.0.0.1:3000;
}

location / {
        proxy_pass http://127.0.0.1:9130;
}

This requires these paths:
/
/favicon.ico
/html/bundle.*js
/html/chunk.*js
/html/bootstrap/

Comment by Wayne Schneider [ 15/Oct/17 ]

Thanks, Julian. We'll talk about this next Wednesday and try to work it into the next sprint. This is great feedback.

Comment by Julian Ladisch [ 05/Sep/18 ]

As reported on yesterday's sprint review: The guest wifi of VZG (GBV headquarters) had port 9130 blocked so that two presenters had some trouble.

Comment by Julian Ladisch [ 14/Mar/19 ]

My comment from 2017 is no longer true, https://folio-demo.gbv.de was changed to use https://folio-demo.gbv.de/okapi as the backend okapi base address using the nginx snippet from https://github.com/folio-org/folio-ansible/blob/master/doc/index.md#replace-port-9130

Comment by Florian Gleixner [ 21/May/21 ]

In folio-ansible this issue should be resolved with commit https://github.com/folio-org/folio-ansible/commit/c23fa078c2552b428f3b39d3145829cbb24630ee

Comment by Wayne Schneider [ 21/May/21 ]

Thanks for cleaning this up, Florian Gleixner! I've closed the issue.

Generated at Thu Feb 08 23:09:07 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.