Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/examples_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ jobs:
- name: Stop BaSyx Minimal Example
run: docker compose -f examples/BaSyxMinimal/docker-compose.yml down

test-basyx-nginx:
test-basyx-reverse-proxy:
runs-on: ubuntu-latest
name: Test BaSyx NGINX Example
name: Test BaSyx Reverse Proxy Example
steps:
- uses: actions/checkout@v5

Expand All @@ -127,11 +127,11 @@ jobs:
distribution: 'adopt'
cache: maven

- name: Start BaSyx NGINX Example
run: docker compose -f examples/BaSyxNGINX/docker-compose.yml up -d
- name: Start BaSyx Reverse Proxy Example
run: docker compose -f examples/BaSyxReverseProxy/docker-compose.yml up -d

- name: Stop BaSyx NGINX Example
run: docker compose -f examples/BaSyxNGINX/docker-compose.yml down
- name: Stop BaSyx Reverse Proxy Example
run: docker compose -f examples/BaSyxReverseProxy/docker-compose.yml down

test-basyx-operation-delegation:
runs-on: ubuntu-latest
Expand Down
52 changes: 0 additions & 52 deletions examples/BaSyxNGINX/nginx/nginx.conf

This file was deleted.

File renamed without changes.
63 changes: 63 additions & 0 deletions examples/BaSyxReverseProxy/apache/httpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Minimal Apache HTTP Server configuration for reverse proxy

ServerRoot "/usr/local/apache2"
Listen ${PORT}
ServerName ${HOSTNAME}
ErrorLog /dev/stderr
CustomLog /dev/stdout combined
User daemon
Group daemon

# Load required modules
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so

# Virtual host for reverse proxy
<VirtualHost *:${PORT}>
<Directory />
Require all granted
</Directory>

# Configuration for the AAS Environment
ProxyPass /aas-environment/ http://aas-env:8081/aas-environment/
ProxyPassReverse /aas-environment/ http://aas-env:8081/aas-environment/

# Configuration for the AAS Registry
ProxyPass /aas-registry/ http://aas-registry:8080/aas-registry/
ProxyPassReverse /aas-registry/ http://aas-registry:8080/aas-registry/

# Configuration for the AAS Registry 2
ProxyPass /aas-registry-2/ http://aas-registry-2:8080/aas-registry-2/
ProxyPassReverse /aas-registry-2/ http://aas-registry-2:8080/aas-registry-2/

# Configuration for the Submodel Registry
ProxyPass /sm-registry/ http://sm-registry:8080/sm-registry/
ProxyPassReverse /sm-registry/ http://sm-registry:8080/sm-registry/

# Configuration for the Submodel Registry 2
ProxyPass /sm-registry-2/ http://sm-registry-2:8080/sm-registry-2/
ProxyPassReverse /sm-registry-2/ http://sm-registry-2:8080/sm-registry-2/

# Configuration for the AAS Discovery Service
ProxyPass /aas-discovery/ http://aas-discovery:8081/aas-discovery/
ProxyPassReverse /aas-discovery/ http://aas-discovery:8081/aas-discovery/

# Configuration for the AAS Web UI (aas-gui path)
ProxyPass /aas-gui/ http://aas-web-ui:3000/aas-gui/
ProxyPassReverse /aas-gui/ http://aas-web-ui:3000/aas-gui/
# Remove X-Frame-Options and Content-Security-Policy headers
Header unset X-Frame-Options
Header unset Content-Security-Policy
# Add custom security headers for iframe embedding
Header always set Content-Security-Policy "frame-ancestors 'self' https://demo3.digital-twin.host"
Header always set X-Frame-Options "ALLOW-FROM https://demo3.digital-twin.host"

# Configuration for the SPS Demonstrator UI (root path)
ProxyPass / http://sps-demonstrator-ui:3000/
ProxyPassReverse / http://sps-demonstrator-ui:3000/
</VirtualHost>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
# nginx
nginx:
image: nginx:alpine
container_name: nginx
# apache
apache:
image: httpd:alpine
container_name: apache
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./apache/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
restart: always
depends_on:
aas-env:
Expand Down