From 3f46d0e321cd0356fded5986c54f8e3e4dc67f5c Mon Sep 17 00:00:00 2001 From: Emmanuel Nyachoke Date: Tue, 9 Jan 2024 17:52:26 +0300 Subject: [PATCH 1/2] OZ-457: Switch Reverse Proxy to Nginx --- README.md | 2 +- docker-compose-openmrs.yml | 2 - docker-compose-superset.yml | 2 - proxy/Dockerfile | 10 +- proxy/confs/000-80.conf | 10 -- proxy/confs/010-443.conf | 18 ---- proxy/confs/030-8069.conf | 14 --- proxy/confs/040-8081.conf | 26 ----- proxy/confs/050-8088.conf | 14 --- proxy/default.conf.template | 175 ++++++++++++++++++++++++++++++++ proxy/docker-compose.yml | 3 +- proxy/nginx.conf | 30 ++++++ proxy/resources/httpd.conf | 87 ---------------- proxy/resources/proxy-rules | 22 ---- proxy/resources/tls/cert.pem | 19 ---- proxy/resources/tls/chain.pem | 19 ---- proxy/resources/tls/privkey.pem | 27 ----- scripts/start.sh | 6 +- scripts/utils.sh | 4 +- 19 files changed, 216 insertions(+), 274 deletions(-) delete mode 100644 proxy/confs/000-80.conf delete mode 100644 proxy/confs/010-443.conf delete mode 100644 proxy/confs/030-8069.conf delete mode 100644 proxy/confs/040-8081.conf delete mode 100644 proxy/confs/050-8088.conf create mode 100644 proxy/default.conf.template create mode 100644 proxy/nginx.conf delete mode 100644 proxy/resources/httpd.conf delete mode 100644 proxy/resources/proxy-rules delete mode 100644 proxy/resources/tls/cert.pem delete mode 100644 proxy/resources/tls/chain.pem delete mode 100644 proxy/resources/tls/privkey.pem diff --git a/README.md b/README.md index 927f8b0..e6141c2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ It may take some time to setup Ozone for the first time, so hang tight :hourglas When ready Gitpod will launch the tab for OpenMRS 3. -## (option 2) Try Ozone locally using the embedded Apache 2 proxy +## (option 2) Try Ozone locally using the embedded Nginx reverse proxy Clone the repo ```bash diff --git a/docker-compose-openmrs.yml b/docker-compose-openmrs.yml index 107bb57..12ae7c5 100644 --- a/docker-compose-openmrs.yml +++ b/docker-compose-openmrs.yml @@ -35,8 +35,6 @@ services: networks: - ozone - web - ports: - - "8080:8080" restart: unless-stopped volumes: - "openmrs-data:/openmrs/data" diff --git a/docker-compose-superset.yml b/docker-compose-superset.yml index fac0be8..950fa5e 100644 --- a/docker-compose-superset.yml +++ b/docker-compose-superset.yml @@ -26,8 +26,6 @@ services: networks: - ozone - web - ports: - - "8088:8088" restart: unless-stopped volumes: - ${SUPERSET_CONFIG_PATH}/:/etc/superset/ diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 3651e3b..e34fa0d 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -1,8 +1,6 @@ -FROM httpd:2.4-alpine +FROM nginx:1.25-alpine -RUN apk add curl iproute2 iputils less nano tree ca-certificates lsof --no-cache +ENV FRAME_ANCESTORS "" -COPY resources/httpd.conf /usr/local/apache2/conf/httpd.conf -COPY resources/proxy-rules /usr/local/apache2/conf/proxy-rules -COPY resources/tls/cert.pem resources/tls/privkey.pem resources/tls/chain.pem /etc/tls/ -EXPOSE 8069/tcp +COPY nginx.conf /etc/nginx/nginx.conf +COPY default.conf.template /etc/nginx/templates/ \ No newline at end of file diff --git a/proxy/confs/000-80.conf b/proxy/confs/000-80.conf deleted file mode 100644 index 995fd3a..0000000 --- a/proxy/confs/000-80.conf +++ /dev/null @@ -1,10 +0,0 @@ - - include /usr/local/apache2/conf/proxy-rules - - - RewriteEngine On - RewriteCond %{HTTPS} !=on - RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R=temp,L] - - - diff --git a/proxy/confs/010-443.conf b/proxy/confs/010-443.conf deleted file mode 100644 index 96496f7..0000000 --- a/proxy/confs/010-443.conf +++ /dev/null @@ -1,18 +0,0 @@ - - include /usr/local/apache2/conf/proxy-rules - - - LoadModule ssl_module modules/mod_ssl.so - SSLEngine on - SSLCertificateFile "/etc/tls/cert.pem" - SSLCertificateKeyFile "/etc/tls/privkey.pem" - SSLCertificateChainFile "/etc/tls/chain.pem" - - - SSLProxyEngine On - SSLProxyCheckPeerCN on - SSLProxyCheckPeerExpire on - RequestHeader set X-Forwarded-Proto "https" - RequestHeader set X-Forwarded-Port "443" - - diff --git a/proxy/confs/030-8069.conf b/proxy/confs/030-8069.conf deleted file mode 100644 index 1127899..0000000 --- a/proxy/confs/030-8069.conf +++ /dev/null @@ -1,14 +0,0 @@ - - ProxyPass / http://odoo:8069/ - ProxyPassReverse / http://odoo:8069/ - ProxyPreserveHost On - - LoadModule ssl_module modules/mod_ssl.so - SSLEngine on - RequestHeader set X-Forwarded-Proto "https" - SSLCertificateFile "/etc/tls/cert.pem" - SSLCertificateKeyFile "/etc/tls/privkey.pem" - SSLCertificateChainFile "/etc/tls/chain.pem" - - - diff --git a/proxy/confs/040-8081.conf b/proxy/confs/040-8081.conf deleted file mode 100644 index 2582881..0000000 --- a/proxy/confs/040-8081.conf +++ /dev/null @@ -1,26 +0,0 @@ - - ProxyPass / http://senaite:8080/ - ProxyPassReverse / http://senaite:8080/ - - ProxyPreserveHost On - RewriteEngine On - - - RewriteRule ^/(.*) http://senaite:8080/VirtualHostBase/https/%{HTTP_HOST}/senaite/VirtualHostRoot/$1 [P,L] - - - RewriteRule ^/(.*) http://senaite:8080/VirtualHostBase/http/%{HTTP_HOST}/senaite/VirtualHostRoot/$1 [P,L] - - - - - LoadModule ssl_module modules/mod_ssl.so - SSLEngine on - SSLCertificateFile "/etc/tls/cert.pem" - SSLCertificateKeyFile "/etc/tls/privkey.pem" - SSLCertificateChainFile "/etc/tls/chain.pem" - RequestHeader set X-Forwarded-Proto "https" - RewriteRule ^/(.*) http://senaite:8080/VirtualHostBase/https/%{HTTP_HOST}/senaite/VirtualHostRoot/$1 [P,L] - - - diff --git a/proxy/confs/050-8088.conf b/proxy/confs/050-8088.conf deleted file mode 100644 index 4014097..0000000 --- a/proxy/confs/050-8088.conf +++ /dev/null @@ -1,14 +0,0 @@ - - ProxyPass / http://superset:8088/ - ProxyPassReverse / http://superset:8088/ - ProxyPreserveHost On - - LoadModule ssl_module modules/mod_ssl.so - SSLEngine on - RequestHeader set X-Forwarded-Proto "https" - SSLCertificateFile "/etc/tls/cert.pem" - SSLCertificateKeyFile "/etc/tls/privkey.pem" - SSLCertificateChainFile "/etc/tls/chain.pem" - - - diff --git a/proxy/default.conf.template b/proxy/default.conf.template new file mode 100644 index 0000000..c77edf9 --- /dev/null +++ b/proxy/default.conf.template @@ -0,0 +1,175 @@ +map $request_uri $csp_header { + default "default-src 'self' 'unsafe-inline' 'unsafe-eval'; base-uri 'self'; font-src 'self'; img-src 'self' data:; frame-ancestors 'self' ${FRAME_ANCESTORS};"; + "~^/openmrs/(?:admin|dictionary|module|patientDashboard.form)/" "default-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; base-uri 'self'; font-src 'self'; frame-ancestors 'self';"; + "~^/openmrs/owa" "default-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; base-uri 'self'; font-src 'self' data:; img-src 'self' data:; frame-ancestors 'self';"; +} + +map $http_x_forwarded_proto $forwarded_proto { + "~.*" $http_x_forwarded_proto; + default $scheme; +} + +map $http_x_real_ip $forwarded_ip { + "~.*" $http_x_real_ip; + default $remote_addr; +} + +map $forwarded_proto $var_proxy_cookie_flags { + https "JSESSIONID secure samesite=strict"; + default "off"; +} + +upstream frontend { + # always assume the frontend will be available + server frontend max_fails=0; +} + +upstream backend { + server openmrs:8080 max_fails=0; +} + +upstream odoo { + server odoo:8069 max_fails=0; +} +upstream odoochat { + server odoo:8072 max_fails=0; +} + + + +upstream senaite { + server senaite:8080 max_fails=0; +} + +upstream superset { + server superset:8088 max_fails=0; +} + +server { + listen 80; + + add_header X-XSS-Protection "1; mode=block"; + add_header Content-Security-Policy $csp_header; + add_header X-Content-Type-Options nosniff; + + proxy_set_header HOST $host; + proxy_set_header X-Forwarded-Proto $forwarded_proto; + proxy_set_header X-Real-IP $forwarded_ip; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # if serving this via HTTPS, the following is recommended + # proxy_cookie_flags $var_proxy_cookie_flags; + proxy_http_version 1.1; + + gzip on; + gzip_vary on; + # 1 KiB + gzip_min_length 1024; + gzip_proxied any; + gzip_http_version 1.0; + gzip_types font/eot + font/otf + font/ttf + image/svg+xml + text/css + text/javascript + text/plain + text/xml + application/atom+xml + application/geo+json + application/importmap+json + application/javascript + application/x-javascript + application/json + application/ld+json + application/fhir+json + application/fhir+xml + application/manifest+json + application/rdf+xml + application/rss+xml + application/xhtml+xml + application/xml; + + # all redirects are relative to the gateway + absolute_redirect off; + + location = /openmrs/spa { + return 301 /openmrs/spa/; + } + + location /openmrs/spa/ { + proxy_pass http://frontend/; + proxy_redirect http://$host/ /openmrs/spa/; + } + + location /openmrs { + proxy_pass http://backend; + } + + location = / { + return 301 /openmrs/spa/; + } +} + +server { + listen 8069; + server_name localhost; + + # Increase proxy buffer size + proxy_buffers 16 64k; + proxy_buffer_size 128k; + # Force timeouts if the backend dies + proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; + # Enable data compression + gzip on; + gzip_min_length 1100; + gzip_buffers 4 32k; + gzip_types text/plain text/xml text/css text/less application/x-javascript application/xml application/json application/javascript; + gzip_vary on; + + # Proxy header and settings + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + + + # Cache static data + location ~* /web/static/ { + proxy_cache_valid 200 60m; + proxy_buffering on; + expires 864000; + proxy_pass http://odoo; + } + + location / { + proxy_pass http://odoo; + # The following makes the timeout broader + proxy_read_timeout 30000; + proxy_redirect off; + } + + location /longpolling { + proxy_pass http://odoochat; + } +} + +server { + listen 8088; + location / { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://superset; + } +} + +server { + listen 8081; + location / { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + rewrite ^(.*)$ /VirtualHostBase/$scheme/$host/senaite/VirtualHostRoot/$1 break; + proxy_pass http://senaite; + } +} \ No newline at end of file diff --git a/proxy/docker-compose.yml b/proxy/docker-compose.yml index 0fefe15..5f54cca 100644 --- a/proxy/docker-compose.yml +++ b/proxy/docker-compose.yml @@ -7,7 +7,6 @@ services: context: ./ args: TIMEZONE: "${TIMEZONE}" - command: "httpd-foreground ${PROXY_TLS:-}" healthcheck: test: - CMD @@ -18,9 +17,9 @@ services: ozone: ports: - "${PROXY_PUBLIC_PORT:-80}:80" - - "${PROXY_PUBLIC_PORT_TLS:-443}:443" - "8069:8069" - "8081:8081" + - "8088:8088" volumes: - "./confs:/usr/local/apache2/conf/extra" - "${PROXY_TLS_CERTS_PATH:-proxy-tls-certs}:/etc/tls" diff --git a/proxy/nginx.conf b/proxy/nginx.conf new file mode 100644 index 0000000..852d4a9 --- /dev/null +++ b/proxy/nginx.conf @@ -0,0 +1,30 @@ +user nobody; +worker_processes auto; + +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + + keepalive_timeout 65; + + include /etc/nginx/conf.d/*.conf; +} \ No newline at end of file diff --git a/proxy/resources/httpd.conf b/proxy/resources/httpd.conf deleted file mode 100644 index 67f20a6..0000000 --- a/proxy/resources/httpd.conf +++ /dev/null @@ -1,87 +0,0 @@ -ServerRoot "/usr/local/apache2" - -Listen 80 - -#Proxy Odoo -Listen 8069 - -#Proxy SENAITE -Listen 8081 - -#Proxy Superset -Listen 8088 - -LoadModule mpm_event_module modules/mod_mpm_event.so -LoadModule authn_file_module modules/mod_authn_file.so -LoadModule authn_core_module modules/mod_authn_core.so -LoadModule authz_host_module modules/mod_authz_host.so -LoadModule authz_groupfile_module modules/mod_authz_groupfile.so -LoadModule authz_user_module modules/mod_authz_user.so -LoadModule authz_core_module modules/mod_authz_core.so -LoadModule access_compat_module modules/mod_access_compat.so -LoadModule auth_basic_module modules/mod_auth_basic.so -LoadModule reqtimeout_module modules/mod_reqtimeout.so -LoadModule filter_module modules/mod_filter.so -LoadModule mime_module modules/mod_mime.so -LoadModule log_config_module modules/mod_log_config.so -LoadModule env_module modules/mod_env.so -LoadModule headers_module modules/mod_headers.so -LoadModule setenvif_module modules/mod_setenvif.so -LoadModule version_module modules/mod_version.so - -# Enable proxy modules -LoadModule proxy_module modules/mod_proxy.so -LoadModule proxy_http_module modules/mod_proxy_http.so - -# Enable rewrite module -LoadModule rewrite_module modules/mod_rewrite.so - -LoadModule unixd_module modules/mod_unixd.so -LoadModule status_module modules/mod_status.so -LoadModule alias_module modules/mod_alias.so - - - User daemon - Group daemon - - - - Require all denied - - -ErrorLog /proc/self/fd/2 -LogLevel warn - - - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined - LogFormat "%h %l %u %t \"%r\" %>s %b" common - - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio - - CustomLog /proc/self/fd/1 common - - - - ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" - - - - RequestHeader unset Proxy early - - - - TypesConfig conf/mime.types - AddType application/x-compress .Z - AddType application/x-gzip .gz .tgz - - -ServerName ozone - -# Load all .conf files in extra/ folder -Include conf/extra/*.conf - - - SSLRandomSeed startup builtin - SSLRandomSeed connect builtin - Listen 443 - diff --git a/proxy/resources/proxy-rules b/proxy/resources/proxy-rules deleted file mode 100644 index edd8b3c..0000000 --- a/proxy/resources/proxy-rules +++ /dev/null @@ -1,22 +0,0 @@ -# Conveniently redirect / to /openmrs/spa/ -RewriteEngine on -RewriteCond %{REQUEST_URI} ^/$ -RewriteRule (.*) /openmrs/spa/ [R=303,L] - -RewriteCond %{REQUEST_URI} ^/openmrs/spa$ -RewriteRule (.*) /openmrs/spa/ [R=303,L] - -# Frontend - - ProxyPass http://frontend/ - ProxyPassReverse / - ProxyPreserveHost Off - - -# OpenMRS -ProxyPass /openmrs http://openmrs:8080/openmrs -ProxyPassReverse /openmrs http://openmrs:8080/openmrs - -# Keycloak -ProxyPass /auth http://keycloak:8080/auth -ProxyPassReverse /auth http://keycloak:8080/auth diff --git a/proxy/resources/tls/cert.pem b/proxy/resources/tls/cert.pem deleted file mode 100644 index f2620c3..0000000 --- a/proxy/resources/tls/cert.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCTCCAfGgAwIBAgIUVYRy+vUiTnoBw4kaMmKVIAfnvNwwDQYJKoZIhvcNAQEL -BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIwMDEyMTE1MjczMVoXDTMwMDEx -ODE1MjczMVowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEA0AwWyJnTO7Hyb3sHOMusNTEwgtTPYbQy6NGCZcd1t43M -aPjJfHPMt7JlDbmRwNVWq5t+CMW/Pz9PYiAsVNe2zu6PFzb6G2kiC1Hy1qA3V+w0 -Ey07EXUjlY5e06y5gPz86cQKiChQ06M3R9tXdVcVJW0O6QkdinH6PkzfaPDnLjKx -0MsQxNJp/gRJCD6LmsAlg/NwNjfppFNwAsnS2EVrdrP4RpFAKFJ0eWqMS96WKt6F -rQbsUNFhGO/P8no1w+X/5m0XZbJb2VTJYVTTmDW5mhedfsuAHZoYlk1IRXXzNP4l -Zdsu2Zvn2mjLWHCXkoCmHQb4CfofbIQZtmB1BvSfkwIDAQABo1MwUTAdBgNVHQ4E -FgQUmpZhqFMHrg+ak3oe6vbmE9IrsUwwHwYDVR0jBBgwFoAUmpZhqFMHrg+ak3oe -6vbmE9IrsUwwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAqre5 -m2IP9Sl5YHEy1ptqZB3/jODB7x7QyIvElYA/TxlXZaJX/F2fX39RIlKQRtgb9Z5N -97BISY9NmSPAOzxi4Fer/QnAFyIQlvn1nzKxlOq5yXk/uqCNpx/bVggFJW44TNXW -6SeOi2XzSM3+B4TubYsc1RaNqTozFs6JGN+pkysaftdj5xCA1pXy5yEj3wAF5f7L -4ObT50cT/zTb97vaSgkWQxl07E4I5XCu48XGL7+0U9YGRnK1XCKAPUBiYq2BXNwJ -yxJUXryHUBhvmIrWtOPUBl1PLQS75Ufkn1Z0JYlFm8Zi4j/dXxPHnoEehIPt6DuF -SzJYO8EY0p+i9cbp4A== ------END CERTIFICATE----- diff --git a/proxy/resources/tls/chain.pem b/proxy/resources/tls/chain.pem deleted file mode 100644 index f2620c3..0000000 --- a/proxy/resources/tls/chain.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCTCCAfGgAwIBAgIUVYRy+vUiTnoBw4kaMmKVIAfnvNwwDQYJKoZIhvcNAQEL -BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIwMDEyMTE1MjczMVoXDTMwMDEx -ODE1MjczMVowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEA0AwWyJnTO7Hyb3sHOMusNTEwgtTPYbQy6NGCZcd1t43M -aPjJfHPMt7JlDbmRwNVWq5t+CMW/Pz9PYiAsVNe2zu6PFzb6G2kiC1Hy1qA3V+w0 -Ey07EXUjlY5e06y5gPz86cQKiChQ06M3R9tXdVcVJW0O6QkdinH6PkzfaPDnLjKx -0MsQxNJp/gRJCD6LmsAlg/NwNjfppFNwAsnS2EVrdrP4RpFAKFJ0eWqMS96WKt6F -rQbsUNFhGO/P8no1w+X/5m0XZbJb2VTJYVTTmDW5mhedfsuAHZoYlk1IRXXzNP4l -Zdsu2Zvn2mjLWHCXkoCmHQb4CfofbIQZtmB1BvSfkwIDAQABo1MwUTAdBgNVHQ4E -FgQUmpZhqFMHrg+ak3oe6vbmE9IrsUwwHwYDVR0jBBgwFoAUmpZhqFMHrg+ak3oe -6vbmE9IrsUwwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAqre5 -m2IP9Sl5YHEy1ptqZB3/jODB7x7QyIvElYA/TxlXZaJX/F2fX39RIlKQRtgb9Z5N -97BISY9NmSPAOzxi4Fer/QnAFyIQlvn1nzKxlOq5yXk/uqCNpx/bVggFJW44TNXW -6SeOi2XzSM3+B4TubYsc1RaNqTozFs6JGN+pkysaftdj5xCA1pXy5yEj3wAF5f7L -4ObT50cT/zTb97vaSgkWQxl07E4I5XCu48XGL7+0U9YGRnK1XCKAPUBiYq2BXNwJ -yxJUXryHUBhvmIrWtOPUBl1PLQS75Ufkn1Z0JYlFm8Zi4j/dXxPHnoEehIPt6DuF -SzJYO8EY0p+i9cbp4A== ------END CERTIFICATE----- diff --git a/proxy/resources/tls/privkey.pem b/proxy/resources/tls/privkey.pem deleted file mode 100644 index 904b286..0000000 --- a/proxy/resources/tls/privkey.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA0AwWyJnTO7Hyb3sHOMusNTEwgtTPYbQy6NGCZcd1t43MaPjJ -fHPMt7JlDbmRwNVWq5t+CMW/Pz9PYiAsVNe2zu6PFzb6G2kiC1Hy1qA3V+w0Ey07 -EXUjlY5e06y5gPz86cQKiChQ06M3R9tXdVcVJW0O6QkdinH6PkzfaPDnLjKx0MsQ -xNJp/gRJCD6LmsAlg/NwNjfppFNwAsnS2EVrdrP4RpFAKFJ0eWqMS96WKt6FrQbs -UNFhGO/P8no1w+X/5m0XZbJb2VTJYVTTmDW5mhedfsuAHZoYlk1IRXXzNP4lZdsu -2Zvn2mjLWHCXkoCmHQb4CfofbIQZtmB1BvSfkwIDAQABAoIBAQC6YZonrGcom4pt -hPI7V3u3S5ICI1SGW0EgglEnjUFQZ6AwinE3JSbJivAtE4oYDwfORUbr5PwoVTdw -2RHeEEKdr+pRCdeWpuDw80FyNaZfBiTA6Ux5n095tEoPqDWn8P1DD3W/9R4z+4yS -u1XmsVUoakNpUdk9Jk7hcUzUXr09DF6IiMs5gBAwPhoALaI8o3OWe/1oAbpLTQqu -X0LMXYtjFH4Kvs8JIdsQ7bCrOAnjMVcsvRSBziWfa1GVH09wl2AccwHwxIG0kLkZ -QmLTFK4ACIhNL+tUAHrmet5rkbmCMNRpAJq7Zwx2PjFG9KFAJd4YpOm4x14lBmSF -dO+X//OBAoGBAPqZSAmql2+DymjRfwEvkhTYlVDTi9/Tf3RgzonU96gQ54uExfUs -sTv5QC0+g+Tv8s8BlimyH+luK5PFkuIHesvtqaRUBfmurKlT1Isf1yTt1znSIWhv -QWAda/WSrfa5kplpcfpkNbzo0YX3oQL6Gr5A0yhb5WiTjIA0MHBi4rLJAoGBANSI -BdHB9tij89uMEk4zwyZ/R0rvkJN5Pe3FB5fvdE8h/PnS3X5dVKvGIsKRIsnyj6Y2 -tM9SZPkx7kN/rM9S58yHjq4Jy/nUWQXQDvfVb+mXHo1eWmJzhMgRrHSKdPHTc9Hq -q0Fh5Ggjh9IAIG+0PORX83pwKQ4ja7ctLGc7LnF7AoGBAPA6ipVBpKQxOZMb6V1Q -pgA304PFF9x8Wj1NJBF7R+IkOmND56TtsAVnHj+BI10PLLuGsNXNvMvAYiPpjbIC -K5Rcg3hVV9kPutMj2qd34X20RtNV/dKofIpQChNDBmNzZ/aK38mB0QYERf7f8Mjy -yzpA2GtjFNsYPuMTpK/IC7wJAoGBANNZARB6ppMBV7t4K6wA5Ywe/jKS0V8WLnOI -f+ijgzI+RmfZPdIv1ceMHX0G/2V8BUXxGRUihq8Y7CvLh3oUo9ZM56JCs8kZVf3l -zTy/z66nTQagUZmd7ulWSf0KwwjIkmCp0OwQASdeTe6Tma37uqIIpGOZrfoVV0St -c36k56aJAoGAdPcKKG/UyWOXuNBuuIWYp1ki2FrxeAe2BxH2hddYqGFOG7WyM8eh -1/Cln43pgi0m7pAt/jHPZ+fjQ1cqk6jjqG7xRpow1zao5vAEZiDr93XMkSpL9yEw -HlsoTqnhZYrE00G0A9gl4wU7Xb2K3lMPZrt1PsEMbiNq6VjaDn+TR0w= ------END RSA PRIVATE KEY----- diff --git a/scripts/start.sh b/scripts/start.sh index 1529909..0c2d1ed 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -18,8 +18,8 @@ if [ "$TRAEFIK" == "true" ]; then setTraefikIP setTraefikHostnames else - echo "$INFO \$TRAEFIK!=true, setting Apache 2 hostnames..." - setApache2Hostnames + echo "$INFO \$TRAEFIK!=true, setting Nginx hostnames..." + setNginxHostnames fi # Set the demo patients props @@ -62,7 +62,7 @@ if [[ $INSTALLED_DOCKER_VERSION =~ $MINIMUM_REQUIRED_DOCKER_VERSION_REGEX ]]; th echo "" ($dockerComposeProxyCommand) else - echo "$INFO Skipping running Apache 2 proxy... (\$TRAEFIK=true)" + echo "$INFO Skipping running Nginx proxy... (\$TRAEFIK=true)" fi # Run the Demo service diff --git a/scripts/utils.sh b/scripts/utils.sh index 3b04471..a3fea27 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -109,8 +109,8 @@ function setTraefikHostnames { } -function setApache2Hostnames { - echo "$INFO Exporting Apache 2 hostnames..." +function setNginxHostnames { + echo "$INFO Exporting Nginx hostnames..." export O3_HOSTNAME="localhost" export ODOO_HOSTNAME="localhost:8069" From 2fc136c960c55963eb87eb49caa96d09ff725470 Mon Sep 17 00:00:00 2001 From: Emmanuel Nyachoke Date: Tue, 9 Jan 2024 20:03:22 +0300 Subject: [PATCH 2/2] Fix minor issues --- proxy/docker-compose.yml | 2 +- scripts/utils.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/docker-compose.yml b/proxy/docker-compose.yml index 5f54cca..f6daf39 100644 --- a/proxy/docker-compose.yml +++ b/proxy/docker-compose.yml @@ -1,6 +1,6 @@ services: - # Apache HTTPD - Entry point for the application. + # Nginx - Entry point for the application. proxy: restart: unless-stopped build: diff --git a/scripts/utils.sh b/scripts/utils.sh index a3fea27..1a31bfd 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -110,7 +110,7 @@ function setTraefikHostnames { } function setNginxHostnames { - echo "$INFO Exporting Nginx hostnames..." + echo "$INFO Exporting Nginx hostnames..." export O3_HOSTNAME="localhost" export ODOO_HOSTNAME="localhost:8069"