Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2de8ab305b | ||
|
|
acad4b4a87 | ||
|
|
2ea54e9e71 | ||
|
|
99ae558713 | ||
|
|
9c0032d5ff | ||
|
|
1eb55a9cfa | ||
|
|
dae3363f45 | ||
|
|
eec088db25 | ||
|
|
1deaec32a4 | ||
|
|
52f9d41b1e | ||
|
|
c156ec15fb | ||
|
|
4f3d723489 | ||
|
|
2eaed5d1d0 | ||
|
|
bb45793fbe | ||
|
|
e75a2763bf | ||
|
|
175191f689 |
@@ -0,0 +1,2 @@
|
||||
# Legacy naming convention for docker containers
|
||||
COMPOSE_COMPATIBILITY=true
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
FROM metasfresh/metasfresh-app:5.175
|
||||
ARG BASE_REGISTRY=metasfresh
|
||||
FROM $BASE_REGISTRY/metasfresh-app:5.175
|
||||
|
||||
COPY sources/configs/* /opt/metasfresh/
|
||||
COPY sources/start_app.sh /opt/metasfresh/
|
||||
|
||||
@@ -27,6 +27,11 @@ spring.rabbitmq.port=5672
|
||||
spring.rabbitmq.username=metasfresh
|
||||
spring.rabbitmq.password=metasfresh
|
||||
|
||||
spring.rabbitmq.listener.direct.consumers-per-queue=1
|
||||
spring.rabbitmq.listener.direct.prefetch=1
|
||||
spring.rabbitmq.listener.simple.max-concurrency=1
|
||||
spring.rabbitmq.listener.simple.prefetch=1
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# Elasticsearch
|
||||
# for more properties, see https://github.com/spring-projects/spring-boot/blob/v1.4.1.RELEASE/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchProperties.java
|
||||
@@ -34,3 +39,4 @@ spring.rabbitmq.password=metasfresh
|
||||
# Elasticsearch cluster name.
|
||||
spring.data.elasticsearch.cluster-name=metasfresh
|
||||
spring.data.elasticsearch.cluster-nodes=search:9300
|
||||
spring.data.elasticsearch.client.reactive.endpoints=search:9200
|
||||
|
||||
@@ -10,7 +10,6 @@ PID_FOLDER=/opt/metasfresh
|
||||
|
||||
JAVA_OPTS="\
|
||||
-Xmx1024M\
|
||||
-XX:MaxPermSize=512M\
|
||||
-XX:+HeapDumpOnOutOfMemoryError\
|
||||
-DPropertyFile=/opt/metasfresh/metasfresh.properties\
|
||||
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8788\
|
||||
|
||||
@@ -45,6 +45,13 @@ run_db_update()
|
||||
cd /opt/metasfresh/dist/install/ && java -jar ./lib/de.metas.migration.cli.jar $@
|
||||
}
|
||||
|
||||
# For Instances with Java8. Should have no effect on other java versions due to absolute paths used.
|
||||
# Need to remove this file or we get "java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper" when running jasper reports
|
||||
remove_accessibility-properties(){
|
||||
rm -fv /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/accessibility.properties
|
||||
rm -fv /etc/java-8-openjdk/accessibility.properties
|
||||
}
|
||||
|
||||
run_metasfresh()
|
||||
{
|
||||
|
||||
@@ -82,6 +89,8 @@ wait_dbms
|
||||
|
||||
run_db_update
|
||||
|
||||
remove_accessibility-properties
|
||||
|
||||
run_metasfresh
|
||||
|
||||
exit 0
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
FROM metasfresh/metasfresh-db:5.175
|
||||
ARG BASE_REGISTRY=metasfresh
|
||||
FROM $BASE_REGISTRY/metasfresh-db:5.175
|
||||
|
||||
RUN localedef -i de_DE -c -f UTF-8 -A /usr/share/locale/locale.alias de_DE.UTF-8
|
||||
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
FROM postgrest/postgrest:latest
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
FROM metasfresh/metasfresh-webapi:5.175
|
||||
ARG BASE_REGISTRY=metasfresh
|
||||
FROM $BASE_REGISTRY/metasfresh-webapi:5.175
|
||||
|
||||
COPY sources/configs/* /opt/metasfresh-webui-api/
|
||||
COPY sources/start_webapi.sh /opt/metasfresh-webui-api/
|
||||
|
||||
@@ -16,6 +16,11 @@ spring.rabbitmq.port=5672
|
||||
spring.rabbitmq.username=metasfresh
|
||||
spring.rabbitmq.password=metasfresh
|
||||
|
||||
spring.rabbitmq.listener.direct.consumers-per-queue=1
|
||||
spring.rabbitmq.listener.direct.prefetch=1
|
||||
spring.rabbitmq.listener.simple.max-concurrency=1
|
||||
spring.rabbitmq.listener.simple.prefetch=1
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# Elasticsearch
|
||||
# for more properties, see https://github.com/spring-projects/spring-boot/blob/v1.4.1.RELEASE/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchProperties.java
|
||||
@@ -23,6 +28,7 @@ spring.rabbitmq.password=metasfresh
|
||||
# Elasticsearch cluster name.
|
||||
spring.data.elasticsearch.cluster-name=metasfresh
|
||||
spring.data.elasticsearch.cluster-nodes=search:9300
|
||||
spring.data.elasticsearch.client.reactive.endpoints=search:9200
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# Logging
|
||||
|
||||
@@ -25,7 +25,7 @@ wait_dbms()
|
||||
run_metasfresh()
|
||||
{
|
||||
cd /opt/metasfresh-webui-api/ && java -Dsun.misc.URLClassPath.disableJarChecking=true \
|
||||
-Xmx1024M -XX:MaxPermSize=512M \
|
||||
-Xmx1024M \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/metasfresh-webui-api/heapdump \
|
||||
-DPropertyFile=/opt/metasfresh-webui-api/metasfresh.properties \
|
||||
-Dcom.sun.management.jmxremote.port=1618 \
|
||||
|
||||
+20
-23
@@ -1,27 +1,24 @@
|
||||
FROM metasfresh/metasfresh-webui:5.175
|
||||
ARG BASE_REGISTRY=metasfresh
|
||||
ARG MF_VERSION=5.175
|
||||
|
||||
COPY sources/configs/config.js /opt/metasfresh-webui-frontend/dist/
|
||||
FROM ${BASE_REGISTRY}/metasfresh-webui:${MF_VERSION} AS bundle
|
||||
|
||||
# nginx:stable (Debian, not alpine) for GNU sed in the entrypoint.
|
||||
FROM nginx:stable
|
||||
RUN rm -f /etc/nginx/conf.d/default.conf
|
||||
|
||||
# openssl is used by the entrypoint to validate mounted certs.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends openssl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY conf.d/ /etc/nginx/conf.d/
|
||||
COPY snippets/ /etc/nginx/snippets/
|
||||
COPY docker-entrypoint.d/10-metasfresh.sh /docker-entrypoint.d/10-metasfresh.sh
|
||||
RUN chmod +x /docker-entrypoint.d/10-metasfresh.sh
|
||||
|
||||
COPY --from=bundle /opt/metasfresh-webui-frontend/dist/ /opt/metasfresh-webui-frontend/dist/
|
||||
COPY sources/configs/config.js /opt/metasfresh-webui-frontend/dist/
|
||||
COPY sources/configs/mobile/config.js /opt/metasfresh-webui-frontend/dist/mobile/
|
||||
|
||||
#add apache config
|
||||
COPY sources/configs/metasfresh_webui.conf /etc/apache2/sites-available/
|
||||
RUN mkdir -p /etc/apache2/certs/
|
||||
COPY sources/certs /etc/apache2/certs
|
||||
|
||||
RUN a2ensite metasfresh_webui.conf
|
||||
|
||||
#set environment
|
||||
RUN . /etc/apache2/envvars
|
||||
|
||||
ENV APACHE_RUN_USER www-data
|
||||
ENV APACHE_RUN_GROUP www-data
|
||||
ENV APACHE_PID_FILE /var/run/apache2.pid
|
||||
ENV APACHE_RUN_DIR /var/run/apache2
|
||||
ENV APACHE_LOCK_DIR /var/lock/apache2
|
||||
ENV APACHE_LOG_DIR /var/log/apache2
|
||||
|
||||
RUN chown www-data:www-data -R /opt/metasfresh-webui-frontend/
|
||||
|
||||
|
||||
EXPOSE 80 443
|
||||
ENTRYPOINT ["/start_webui.sh"]
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# WebSocket upgrade map.
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
# Preserve X-Forwarded-Proto from the host proxy, fall back to $scheme.
|
||||
map $http_x_forwarded_proto $forwarded_proto {
|
||||
default $http_x_forwarded_proto;
|
||||
'' $scheme;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# Enabled by the entrypoint (renamed to webui-ssl.conf) only when certs are mounted.
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
include /etc/nginx/snippets/metasfresh-locations.conf;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
include /etc/nginx/snippets/metasfresh-locations.conf;
|
||||
}
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
# Patch config.js, set the webapi upstream, and enable SSL if certs are mounted.
|
||||
set -eu
|
||||
|
||||
DIST=/opt/metasfresh-webui-frontend/dist
|
||||
CONF_D=/etc/nginx/conf.d
|
||||
CERT_DIR=/etc/nginx/certs
|
||||
|
||||
if [ -n "${WEBAPI_URL:-}" ]; then
|
||||
sed -i "s,http://MYDOCKERHOST:PORT,${WEBAPI_URL},g" "$DIST/config.js"
|
||||
sed -i "s,http://MYDOCKERHOST:PORT,${WEBAPI_URL},g" "$DIST/mobile/config.js"
|
||||
fi
|
||||
|
||||
# Default plain HTTP; override with WEBAPI_UPSTREAM (e.g. https://webapi:8443).
|
||||
sed -i "s|__WEBAPI_UPSTREAM__|${WEBAPI_UPSTREAM:-http://webapi:8080}|g" \
|
||||
/etc/nginx/snippets/metasfresh-locations.conf
|
||||
|
||||
CERT="$CERT_DIR/fullchain.pem"
|
||||
KEY="$CERT_DIR/privkey.pem"
|
||||
|
||||
if [ ! -e "$CERT" ] && [ ! -e "$KEY" ]; then
|
||||
rm -f "$CONF_D/webui-ssl.conf"
|
||||
echo "[METASFRESH] Running Non-SSL!"
|
||||
else
|
||||
[ -e "$CERT" ] || { echo "[METASFRESH] FATAL: privkey.pem present but fullchain.pem missing"; exit 1; }
|
||||
[ -e "$KEY" ] || { echo "[METASFRESH] FATAL: fullchain.pem present but privkey.pem missing"; exit 1; }
|
||||
[ -s "$CERT" ] || { echo "[METASFRESH] FATAL: fullchain.pem is empty"; exit 1; }
|
||||
[ -s "$KEY" ] || { echo "[METASFRESH] FATAL: privkey.pem is empty"; exit 1; }
|
||||
|
||||
# Match key and cert by public key (RSA and EC).
|
||||
cert_pub=$(openssl x509 -in "$CERT" -noout -pubkey 2>/dev/null) \
|
||||
|| { echo "[METASFRESH] FATAL: fullchain.pem is not a valid certificate"; exit 1; }
|
||||
key_pub=$(openssl pkey -in "$KEY" -pubout 2>/dev/null) \
|
||||
|| { echo "[METASFRESH] FATAL: privkey.pem is not a valid private key"; exit 1; }
|
||||
[ "$cert_pub" = "$key_pub" ] \
|
||||
|| { echo "[METASFRESH] FATAL: privkey.pem does not match fullchain.pem"; exit 1; }
|
||||
|
||||
# Expiry is a warning only; an expired cert still serves.
|
||||
if ! openssl x509 -in "$CERT" -noout -checkend 0 >/dev/null 2>&1; then
|
||||
echo "[METASFRESH] WARNING: fullchain.pem is EXPIRED"
|
||||
elif ! openssl x509 -in "$CERT" -noout -checkend 2592000 >/dev/null 2>&1; then
|
||||
echo "[METASFRESH] WARNING: fullchain.pem expires within 30 days"
|
||||
fi
|
||||
|
||||
cp "$CONF_D/webui-ssl.conf.disabled" "$CONF_D/webui-ssl.conf"
|
||||
sed -i 's/\bhttp\b/https/g' "$DIST/config.js" "$DIST/mobile/config.js"
|
||||
nginx -t || { echo "[METASFRESH] FATAL: nginx config test failed"; exit 1; }
|
||||
echo "[METASFRESH] Activated SSL!"
|
||||
fi
|
||||
@@ -0,0 +1,67 @@
|
||||
# Shared locations for the HTTP and SSL servers.
|
||||
# __WEBAPI_UPSTREAM__ is replaced by the entrypoint (default http://webapi:8080).
|
||||
|
||||
root /opt/metasfresh-webui-frontend/dist;
|
||||
index index.html;
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_set_header Host $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 $forwarded_proto;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_read_timeout 600s;
|
||||
client_max_body_size 100M;
|
||||
|
||||
# webapi
|
||||
location /rest { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /info { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /configuration { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /oauth2 { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /login/oauth2 { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /swagger-ui.html { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /swagger-ui/ { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /swagger-resources { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /v2/api-docs { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /v3/api-docs { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
location /webjars/springfox-swagger-ui { proxy_pass __WEBAPI_UPSTREAM__; }
|
||||
|
||||
location /stomp {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
client_max_body_size 50M;
|
||||
proxy_pass __WEBAPI_UPSTREAM__;
|
||||
}
|
||||
|
||||
# app
|
||||
location = /app { return 308 /app/; }
|
||||
location /app/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
client_max_body_size 50M;
|
||||
proxy_pass http://app:8282/;
|
||||
}
|
||||
|
||||
# static + SPA + mobile
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
add_header Pragma "no-cache";
|
||||
expires -1;
|
||||
}
|
||||
location = /service-worker.js {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
add_header Pragma "no-cache";
|
||||
expires -1;
|
||||
}
|
||||
location /mobile/ {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
add_header Pragma "no-cache";
|
||||
expires -1;
|
||||
try_files $uri /mobile/index.html;
|
||||
}
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
<VirtualHost *:80>
|
||||
ProxyRequests Off
|
||||
DocumentRoot /opt/metasfresh-webui-frontend/dist/
|
||||
|
||||
# Logging
|
||||
ErrorLog ${APACHE_LOG_DIR}/webui_error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/webui_access.log combined
|
||||
|
||||
# Debugging
|
||||
# NOTE: pls comment the ErrorLog and CustomLog entries above
|
||||
#ErrorLog /dev/stdout
|
||||
#TransferLog /dev/stdout
|
||||
#LogLevel alert rewrite:trace8
|
||||
|
||||
<Location /rest>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/rest/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/rest/
|
||||
</Location>
|
||||
|
||||
<Location /stomp>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
RewriteEngine on
|
||||
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
|
||||
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
|
||||
RewriteRule .* ws://webapi:8080%{REQUEST_URI} [P]
|
||||
ProxyPass ws://webapi:8080/stomp/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse ws://webapi:8080/stomp/
|
||||
ProxyPass http://webapi:8080/stomp/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/stomp/
|
||||
</Location>
|
||||
|
||||
<Location /info>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/info retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/info
|
||||
</Location>
|
||||
|
||||
<Location /swagger-ui.html>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/swagger-ui.html retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/swagger-ui.html
|
||||
</Location>
|
||||
|
||||
<Location /v2/api-docs>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/v2/api-docs/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/v2/api-docs/
|
||||
</Location>
|
||||
|
||||
<Location /swagger-resources>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/swagger-resources/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/swagger-resources/
|
||||
</Location>
|
||||
|
||||
<Location /webjars/springfox-swagger-ui>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/webjars/springfox-swagger-ui/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/webjars/springfox-swagger-ui/
|
||||
</Location>
|
||||
|
||||
<Location /configuration>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/configuration/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/configuration/
|
||||
</Location>
|
||||
|
||||
<Location /info>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/info retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/info
|
||||
</Location>
|
||||
|
||||
<Location /mobile>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
FileETag None
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
|
||||
</Location>
|
||||
|
||||
<Directory /opt/metasfresh-webui-frontend/dist/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
RewriteEngine On
|
||||
|
||||
# Existing file or directory
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
# mobile UI
|
||||
RewriteCond %{REQUEST_URI} ^/mobile
|
||||
RewriteRule ^ /mobile/index.html [L]
|
||||
|
||||
# Fallback:
|
||||
RewriteRule ^ /index.html
|
||||
</Directory>
|
||||
|
||||
<Files index.html>
|
||||
FileETag None
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
|
||||
</Files>
|
||||
|
||||
</VirtualHost>
|
||||
@@ -1,133 +0,0 @@
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
ProxyRequests Off
|
||||
DocumentRoot /opt/metasfresh-webui-frontend/dist/
|
||||
|
||||
# Logging
|
||||
ErrorLog ${APACHE_LOG_DIR}/webui_error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/webui_access.log combined
|
||||
|
||||
# Debugging
|
||||
# NOTE: pls comment the ErrorLog and CustomLog entries above
|
||||
#ErrorLog /dev/stdout
|
||||
#TransferLog /dev/stdout
|
||||
#LogLevel alert rewrite:trace8
|
||||
|
||||
<Location /rest>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/rest/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/rest/
|
||||
</Location>
|
||||
|
||||
<Location /stomp>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
RewriteEngine on
|
||||
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
|
||||
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
|
||||
RewriteRule .* ws://webapi:8080%{REQUEST_URI} [P]
|
||||
ProxyPass wss://webapi:8080/stomp/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse wss://webapi:8080/stomp/
|
||||
ProxyPass http://webapi:8080/stomp/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/stomp/
|
||||
</Location>
|
||||
|
||||
<Location /info>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/info retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/info
|
||||
</Location>
|
||||
|
||||
<Location /swagger-ui.html>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/swagger-ui.html retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/swagger-ui.html
|
||||
</Location>
|
||||
|
||||
<Location /v2/api-docs>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/v2/api-docs/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/v2/api-docs/
|
||||
</Location>
|
||||
|
||||
<Location /swagger-resources>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/swagger-resources/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/swagger-resources/
|
||||
</Location>
|
||||
|
||||
<Location /webjars/springfox-swagger-ui>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/webjars/springfox-swagger-ui/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/webjars/springfox-swagger-ui/
|
||||
</Location>
|
||||
|
||||
<Location /configuration>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/configuration/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/configuration/
|
||||
</Location>
|
||||
|
||||
<Location /info>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ProxyPass http://webapi:8080/info retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/info
|
||||
</Location>
|
||||
|
||||
<Location /mobile>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
FileETag None
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
|
||||
</Location>
|
||||
|
||||
<Directory /opt/metasfresh-webui-frontend/dist/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
RewriteEngine On
|
||||
|
||||
# Existing file or directory
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
# mobile UI
|
||||
RewriteCond %{REQUEST_URI} ^/mobile
|
||||
RewriteRule ^ /mobile/index.html [L]
|
||||
|
||||
# Fallback:
|
||||
RewriteRule ^ /index.html
|
||||
</Directory>
|
||||
|
||||
<Files index.html>
|
||||
FileETag None
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
|
||||
</Files>
|
||||
|
||||
<Files service-worker.js>
|
||||
FileETag None
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
|
||||
</Files>
|
||||
|
||||
SSLCertificateFile /etc/apache2/certs/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/apache2/certs/privkey.pem
|
||||
</VirtualHost>
|
||||
</IfModule>
|
||||
@@ -1,3 +1,6 @@
|
||||
const config = {
|
||||
SERVER_URL: 'http://MYDOCKERHOST:PORT/app',
|
||||
SERVER_URL: 'http://MYDOCKERHOST:PORT/app'
|
||||
};
|
||||
window.config = {
|
||||
SERVER_URL: 'http://MYDOCKERHOST:PORT/app'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user