Service type
Nginx (openBIS) service
Nginx web service in front of openBIS that serves as its public entry point and routes requests to the application server and data store.
Use it as a reusable, versioned service inside custom or predefined stacks so teams can keep the runtime and operational model consistent.
On Wodby
How Nginx (openBIS) runs on Wodby
How it works
- The required backend link sets
NGINX_BACKEND_HOSTandNGINX_BACKEND_PORTto the linked service's host and port. They form the only upstream. - The service sets
NGINX_VHOST_PRESETtohttp-proxy. Requests are passed to the backend over HTTP with the headersHost,X-Forwarded-ForandX-Forwarded-Proto. The backend must listen on the port of its endpoint and should read the scheme and client address from those headers. - The preset sets no
UpgradeorConnectionheaders.
The configuration is rendered from templates and environment variables on every start, into /etc/nginx/nginx.conf, /etc/nginx/conf.d/vhost.conf, /etc/nginx/preset.conf and /etc/nginx/upstream.conf. Never edit these files in a running container.
Requests that do not reach the backend
The image's default rules are answered by Nginx itself:
/.healthzreturns 204. It reports on the proxy, not on the backend./favicon.ico,/robots.txt,/humans.txt,/ads.txt,/llms.txt, everything under/.well-known/, and paths ending in.flv,.mp4,.m4aor.movare looked up on the proxy's own disk, where there are no application files: a missing favicon gets an empty image, the others are not found.- Other paths that start with a dot are denied, as are
wodby.ymlandMakefile.
Set NGINX_VHOST_NO_DEFAULTS on the service when the backend must answer these paths itself.
Nginx also adds the response headers X-XSS-Protection, X-Frame-Options, X-Content-Type-Options and a Content-Security-Policy that forbids framing. Set NGINX_HEADERS_CONTENT_SECURITY_POLICY to change the policy, or NGINX_NO_DEFAULT_HEADERS to leave headers to the backend.
Changing configuration
- Environment variables on the service. The ones that matter most for a proxied application:
NGINX_CLIENT_MAX_BODY_SIZE(largest accepted request body),NGINX_BACKEND_FAIL_TIMEOUT,NGINX_SET_REAL_IP_FROMandNGINX_REAL_IP_HEADER,NGINX_GZIP. - The two declared config files: the main config template and the virtual host template.
Other services reach the proxy over HTTP on port 80 at the app service's name inside the environment.
Check the result
nginx -Tprints the configuration in effect, including the upstream.curl -sI localhost/.healthzreturns 204 from inside the container.
Nginx for openBIS on Wodby
What this service adds to the Nginx Proxy service it is based on. It is the public entry point of an openBIS app: openBIS's own ports are private.
Rules
openBIS's rules replace the image's http-proxy preset. They are the preset config file of this service and can be overridden there. The preset keeps the name http-proxy (NGINX_VHOST_PRESET), which also makes the image point the app_server upstream at the linked openBIS service's application server.
/redirects to the lab notebook,/openbis/webapp/eln-lims/./openbisgoes to the application server (port 8080),/datastore_serverto the data store server (8081,NGINX_OPENBIS_DSS_PORT) and/afs-serverto the file server (8085,NGINX_OPENBIS_AFS_PORT).- Other paths are not found.
- The scheme and client address that Wodby's gateway received are passed on in
X-Forwarded-ProtoandX-Forwarded-For, with the originalHost. /.healthzreturns 204.- The image's default rules are off (
NGINX_VHOST_NO_DEFAULTS).
Uploads and timeouts
Requests have no size limit and are streamed to openBIS without buffering, in both directions. Proxy timeouts are one hour (NGINX_OPENBIS_PROXY_TIMEOUT), and routes allow requests up to one hour.
Image
The stock Nginx image; nothing is built for this service.
Overview
Technical profile and packaging
Versions
Built on top
Source repository
Public Helm chart
Ports and protocols
Labels
Stacks
Use it inside ready-made stacks or your own
Runtime wiring
Reuse connectivity, storage, and runtime defaults
Endpoints
Technical domains
Configs
Service links
These links define which other services can connect to Nginx (openBIS) when it is used inside a stack.
backend
Eligible linked services