Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fc653d5cd |
@@ -1,4 +1,4 @@
|
||||
FROM metasfresh/metasfresh-app:5.101
|
||||
FROM metasfresh/metasfresh-app:5.61
|
||||
|
||||
COPY sources/configs/* /opt/metasfresh/
|
||||
COPY sources/start_app.sh /opt/metasfresh/
|
||||
|
||||
@@ -55,8 +55,7 @@ run_metasfresh()
|
||||
|
||||
cd /opt/metasfresh/ && java \
|
||||
-Dsun.misc.URLClassPath.disableJarChecking=true \
|
||||
-Xmx1024M -XX:MaxPermSize=512M \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/metasfresh/heapdump \
|
||||
-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError \
|
||||
-DPropertyFile=/opt/metasfresh/metasfresh.properties \
|
||||
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8788 \
|
||||
-Dcom.sun.net.ssl.enableECC=false \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM metasfresh/metasfresh-db:5.101
|
||||
FROM metasfresh/metasfresh-db:5.61
|
||||
|
||||
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
|
||||
|
||||
@@ -25,7 +25,6 @@ app:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/app/log:/opt/metasfresh/log:rw
|
||||
- ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
environment:
|
||||
@@ -47,7 +46,6 @@ webapi:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
|
||||
- ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
webui:
|
||||
|
||||
@@ -12,9 +12,8 @@ RUN apt -y install netcat \
|
||||
&& apt -y autoclean
|
||||
|
||||
RUN mkdir -p /opt/metasfresh
|
||||
RUN curl https://repo.metasfresh.com/content/repositories/mvn-release-releases/de/metas/dist/metasfresh-dist-dist/5.101.2-968+release/metasfresh-dist-dist-5.101.2-968+release-dist.tar.gz \
|
||||
RUN curl https://repo.metasfresh.com/content/repositories/mvn-release-releases/de/metas/dist/metasfresh-dist-dist/5.61.2-688+release/metasfresh-dist-dist-5.61.2-688+release-dist.tar.gz \
|
||||
| tar -xzC /opt/metasfresh/
|
||||
RUN mkdir -p /opt/metasfresh/heapdump
|
||||
|
||||
COPY sources/configs/* /opt/metasfresh/
|
||||
COPY sources/configs/local_settings.properties /root/
|
||||
|
||||
@@ -53,13 +53,9 @@ run_metasfresh()
|
||||
# info: https://docs.oracle.com/cd/E26362_01/E40761/html/known-bugs-issues.html
|
||||
# https://stackoverflow.com/a/19379760
|
||||
|
||||
#2019-01-29 jb: added '-XX:HeapDumpPath=/opt/metasfresh/heapdump' to java opts
|
||||
# gh issue: https://github.com/metasfresh/metasfresh-docker/issues/41
|
||||
|
||||
cd /opt/metasfresh/ && java \
|
||||
-Dsun.misc.URLClassPath.disableJarChecking=true \
|
||||
-Xmx1024M -XX:MaxPermSize=512M \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/metasfresh/heapdump \
|
||||
-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError \
|
||||
-DPropertyFile=/opt/metasfresh/metasfresh.properties \
|
||||
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8788 \
|
||||
-Dcom.sun.net.ssl.enableECC=false \
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
-- Thx to https://medium.com/contactually-engineering/postgres-at-scale-query-performance-and-autovacuuming-for-large-tables-d7e8ad40b16b
|
||||
ALTER SYSTEM SET autovacuum_vacuum_scale_factor = 0.05;
|
||||
ALTER SYSTEM SET autovacuum_analyze_scale_factor = 0.05;
|
||||
|
||||
-- Thx to https://blog.2ndquadrant.com/autovacuum-tuning-basics/
|
||||
ALTER TABLE ad_archive SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE ad_archive SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_referenceno_doc SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_referenceno_doc SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE ad_attachment SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE ad_attachment SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE ad_pinstance_para SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE ad_pinstance_para SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE ad_pinstance SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE ad_pinstance SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE ad_pinstance_log SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE ad_pinstance_log SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_subscriptionprogress SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_subscriptionprogress SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_invoice_line_alloc SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_invoice_line_alloc SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_invoiceline SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_invoiceline SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_doc_outbound_log_line SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_doc_outbound_log_line SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_referenceno SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_referenceno SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_doc_responsible SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_doc_responsible SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_invoice SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_invoice SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_printing_queue SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_printing_queue SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_invoicetax SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_invoicetax SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_doc_outbound_log SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_doc_outbound_log SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_payment SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_payment SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_allocationhdr SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_allocationhdr SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_allocationline SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_allocationline SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_contract_term_alloc SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_contract_term_alloc SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_olcand SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_olcand SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
-- not so big, but still need it, i think because a lot of changes are going on in there
|
||||
ALTER TABLE public.t_query_selection SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE public.t_query_selection SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE t_lock SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE t_lock SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE m_shipmentschedule_recompute SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE m_shipmentschedule_recompute SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_invoice_candidate_recompute SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_invoice_candidate_recompute SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE ESR_ImportLine SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE ESR_ImportLine SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE ESR_Import SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE ESR_Import SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_flatrate_term SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_flatrate_term SET (autovacuum_vacuum_threshold = 10000);
|
||||
|
||||
ALTER TABLE c_invoice_candidate SET (autovacuum_vacuum_scale_factor = 0);
|
||||
ALTER TABLE c_invoice_candidate SET (autovacuum_vacuum_threshold = 10000);
|
||||
@@ -18,7 +18,6 @@ app:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/app/log:/opt/metasfresh/log:rw
|
||||
- ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- METASFRESH_HOME=/opt/metasfresh
|
||||
@@ -30,7 +29,6 @@ webapi:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
|
||||
- ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
webui:
|
||||
build: webui
|
||||
|
||||
@@ -22,7 +22,6 @@ services:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/app/log:/opt/metasfresh/log:rw
|
||||
- ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- METASFRESH_HOME=/opt/metasfresh
|
||||
@@ -34,7 +33,6 @@ services:
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
|
||||
- ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
webui:
|
||||
|
||||
@@ -13,9 +13,8 @@ RUN apt -y install netcat \
|
||||
|
||||
COPY sources/configs/local_settings.properties /root/
|
||||
RUN mkdir -p /opt/metasfresh-webui-api/metasfresh-webui-api \
|
||||
&& mkdir -p /opt/metasfresh-webui-api/log \
|
||||
&& mkdir -p /opt/metasfresh-webui-api/heapdump
|
||||
RUN curl https://repo.metasfresh.com/content/repositories/mvn-release/de/metas/ui/web/metasfresh-webui-api/5.101.2-702+release/metasfresh-webui-api-5.101.2-702+release.jar \
|
||||
&& mkdir -p /opt/metasfresh-webui-api/log
|
||||
RUN curl https://repo.metasfresh.com/content/repositories/mvn-release/de/metas/ui/web/metasfresh-webui-api/5.61.2-490+release/metasfresh-webui-api-5.61.2-490+release.jar \
|
||||
--output /opt/metasfresh-webui-api/metasfresh-webui-api.jar \
|
||||
&& chmod 750 /opt/metasfresh-webui-api/metasfresh-webui-api.jar
|
||||
|
||||
|
||||
@@ -22,14 +22,10 @@ wait_dbms()
|
||||
done
|
||||
}
|
||||
|
||||
#2019-01-29 jb: added '-XX:HeapDumpPath=/opt/metasfresh/heapdump' to java opts
|
||||
# gh issue: https://github.com/metasfresh/metasfresh-docker/issues/41
|
||||
|
||||
run_metasfresh()
|
||||
{
|
||||
cd /opt/metasfresh-webui-api/ && java -Dsun.misc.URLClassPath.disableJarChecking=true \
|
||||
-Xmx1024M -XX:MaxPermSize=512M \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/metasfresh/heapdump \
|
||||
-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError \
|
||||
-DPropertyFile=/opt/metasfresh-webui-api/metasfresh.properties \
|
||||
-Dcom.sun.management.jmxremote.port=1618 \
|
||||
-Dcom.sun.management.jmxremote.authenticate=false \
|
||||
|
||||
@@ -1,17 +1,39 @@
|
||||
FROM nginx
|
||||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt update && apt -y full-upgrade
|
||||
RUN apt autoclean && apt update
|
||||
|
||||
RUN apt -y install apache2 \
|
||||
&& apt -y autoremove \
|
||||
&& apt -y autoclean
|
||||
|
||||
RUN a2enmod proxy proxy_http proxy_html proxy_wstunnel rewrite ssl
|
||||
RUN a2dissite 000-default.conf default-ssl.conf
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
RUN mkdir -p /opt/metasfresh-webui-frontend
|
||||
RUN ln -s /usr/share/nginx/html /opt/metasfresh-webui-frontend/dist
|
||||
|
||||
COPY sources/configs/metasfresh_webui.conf /opt/
|
||||
COPY sources/configs/metasfresh_webui_ssl.conf /opt/
|
||||
COPY sources/dist /usr/share/nginx/html
|
||||
COPY sources/dist /opt/metasfresh-webui-frontend/dist
|
||||
COPY sources/configs/config.js /opt/metasfresh-webui-frontend/dist/
|
||||
|
||||
#add apache config
|
||||
COPY sources/configs/metasfresh_webui.conf /etc/apache2/sites-available/
|
||||
COPY sources/configs/metasfresh_webui_ssl.conf /etc/apache2/sites-available/
|
||||
|
||||
#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/
|
||||
|
||||
#add entry-script
|
||||
COPY sources/start_webui.sh /
|
||||
RUN chmod +x /start_webui.sh
|
||||
|
||||
EXPOSE 80 443
|
||||
ENTRYPOINT ["/start_webui.sh"]
|
||||
|
||||
@@ -1,62 +1,86 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
<VirtualHost *:80>
|
||||
ProxyRequests Off
|
||||
DocumentRoot /opt/metasfresh-webui-frontend/dist/
|
||||
ErrorLog ${APACHE_LOG_DIR}/webui_error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/webui_access.log combined
|
||||
|
||||
proxy_buffering off;
|
||||
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;
|
||||
<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 /rest {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/rest/;
|
||||
}
|
||||
|
||||
location /stomp {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
client_max_body_size 50M;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/stomp/;
|
||||
}
|
||||
<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/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPass http://webapi:8080/stomp/ retry=0 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse http://webapi:8080/stomp/
|
||||
</Location>
|
||||
|
||||
location /info {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/info;
|
||||
}
|
||||
<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 /swagger-ui.html {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/swagger-ui.html;
|
||||
}
|
||||
<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 /v2/api-docs {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/v2/api-docs;
|
||||
}
|
||||
<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 /swagger-resources{
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/swagger-resources/;
|
||||
}
|
||||
<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 /webjars/springfox-swagger-ui{
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/webjars/springfox-swagger-ui/;
|
||||
}
|
||||
<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 /configuration{
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/configuration/;
|
||||
}
|
||||
<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 /msv3 {
|
||||
resolver 127.0.0.1;
|
||||
set $msvproxy "MSV3_API_PROXYPASS_HOST:MSV3_API_PROXYPASS_PORT";
|
||||
|
||||
proxy_pass http://$msvproxy/;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
<Directory /opt/metasfresh-webui-frontend/dist/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
RewriteEngine On
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
|
||||
RewriteRule ^ - [L]
|
||||
RewriteRule ^ /index.html
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
|
||||
@@ -1,72 +1,82 @@
|
||||
server {
|
||||
listen 443 ssl default_server;
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
ProxyRequests Off
|
||||
DocumentRoot /opt/metasfresh-webui-frontend/dist/
|
||||
ErrorLog ${APACHE_LOG_DIR}/webui_error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/webui_access.log combined
|
||||
<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>
|
||||
|
||||
ssl_certificate /etc/ssl/certs/cert.pem;
|
||||
ssl_certificate_key /etc/ssl/certs/privkey.pem;
|
||||
|
||||
ssl_session_timeout 30m;
|
||||
ssl_session_cache builtin:1000 shared:SSL:10m;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
|
||||
ssl_prefer_server_ciphers on;
|
||||
<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>
|
||||
|
||||
proxy_buffering off;
|
||||
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;
|
||||
<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 /rest {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/rest/;
|
||||
}
|
||||
|
||||
location /stomp {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
client_max_body_size 50M;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/stomp/;
|
||||
}
|
||||
<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 /info {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/info;
|
||||
}
|
||||
<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 /swagger-ui.html {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/swagger-ui.html;
|
||||
}
|
||||
|
||||
location /v2/api-docs {
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/v2/api-docs;
|
||||
}
|
||||
|
||||
location /swagger-resources{
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/swagger-resources/;
|
||||
}
|
||||
|
||||
location /webjars/springfox-swagger-ui{
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/webjars/springfox-swagger-ui/;
|
||||
}
|
||||
|
||||
location /configuration{
|
||||
proxy_pass http://WEBUI_API_PROXYPASS_HOST:WEBUI_API_PROXYPASS_PORT/configuration/;
|
||||
}
|
||||
|
||||
location /msv3 {
|
||||
resolver 127.0.0.1;
|
||||
set $msvproxy "MSV3_API_PROXYPASS_HOST:MSV3_API_PROXYPASS_PORT";
|
||||
|
||||
proxy_pass http://$msvproxy/;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
# thx to https://github.com/react-boilerplate/react-boilerplate/blob/master/app/.nginx.conf
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
<Directory /opt/metasfresh-webui-frontend/dist/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
RewriteEngine On
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
|
||||
RewriteRule ^ - [L]
|
||||
RewriteRule ^ /index.html
|
||||
</Directory>
|
||||
SSLCertificateFile /etc/apache2/certs/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/apache2/certs/privkey.pem
|
||||
</VirtualHost>
|
||||
</IfModule>
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i" rel="stylesheet">
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<title>Metasfresh</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/config.js"></script>
|
||||
<script type="text/javascript" src="/bundle-b8656aa2b9b95eefca90-git-4f0e0d6.js"></script></body>
|
||||
<script src="/plugins.js"></script>
|
||||
<script type="text/javascript" src="/bundle-f1f6ae58b5179825e749-git-fba6751.js"></script></body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"build": {
|
||||
"releaseVersion": "5.101.2-326+release",
|
||||
"jenkinsBuildUrl": "https://jenkins.metasfresh.com/job/metasfresh-webui-frontend/job/release/326/",
|
||||
"jenkinsBuildNo": "326",
|
||||
"releaseVersion": "5.61.2-180+release",
|
||||
"jenkinsBuildUrl": "https://jenkins.metasfresh.com/job/metasfresh-webui-frontend/job/release/180/",
|
||||
"jenkinsBuildNo": "180",
|
||||
"jenkinsJobName": "metasfresh-webui-frontend/release",
|
||||
"jenkinsBuildTag": "jenkins-metasfresh-webui-frontend-release-326"
|
||||
"gitSHA1": "4f0e0d63e065719d587d9de7a1e7e5f214f977de"
|
||||
"jenkinsBuildTag": "jenkins-metasfresh-webui-frontend-release-180"
|
||||
"gitSHA1": "fba675159418004e2c23ec1a06a9a5e3b0f8daca"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 90 KiB |
@@ -1,2 +0,0 @@
|
||||
<!-- Icon comes from fontawesome.com under CC 4.0 license : https://fontawesome.com/license/free -->
|
||||
<svg aria-hidden="true" data-prefix="fas" data-icon="barcode" class="svg-inline--fa fa-barcode fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#9aafbd" d="M0 448V64h18v384H0zm26.857-.273V64H36v383.727h-9.143zm27.143 0V64h8.857v383.727H54zm44.857 0V64h8.857v383.727h-8.857zm36 0V64h17.714v383.727h-17.714zm44.857 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm18 0V64h8.857v383.727h-8.857zm35.715 0V64h18v383.727h-18zm44.857 0V64h18v383.727h-18zm35.999 0V64h18.001v383.727h-18.001zm36.001 0V64h18.001v383.727h-18.001zm26.857 0V64h18v383.727h-18zm45.143 0V64h26.857v383.727h-26.857zm35.714 0V64h9.143v383.727H476zm18 .273V64h18v384h-18z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 801 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,2 +0,0 @@
|
||||
<!-- Icon comes from fontawesome.com under CC 4.0 license : https://fontawesome.com/license/free -->
|
||||
<svg aria-hidden="true" data-prefix="fas" data-icon="qrcode" class="svg-inline--fa fa-qrcode fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="#9aafbd" d="M0 224h192V32H0v192zM64 96h64v64H64V96zm192-64v192h192V32H256zm128 128h-64V96h64v64zM0 480h192V288H0v192zm64-128h64v64H64v-64zm352-64h32v128h-96v-32h-32v96h-64V288h96v32h64v-32zm0 160h32v32h-32v-32zm-64 0h32v32h-32v-32z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 529 B |
@@ -1,2 +0,0 @@
|
||||
<!-- Icon comes from fontawesome.com under CC 4.0 license : https://fontawesome.com/license/free -->
|
||||
<svg aria-hidden="true" data-prefix="fas" data-icon="spinner" class="svg-inline--fa fa-spinner fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#9aafbd" d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 890 B |
|
Before Width: | Height: | Size: 932 B |
|
Before Width: | Height: | Size: 333 B |
@@ -1,49 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
webapi_client_host=${WEBUI_API_CLIENT_HOST:-webapi}
|
||||
webapi_client_port=${WEBUI_API_CLIENT_PORT:-8080}
|
||||
|
||||
webapi_proxypass_host=${WEBUI_API_PROXYPASS_HOST:-webapi}
|
||||
webapi_proxypass_port=${WEBUI_API_PROXYPASS_PORT:-8080}
|
||||
|
||||
msv3_proxypass_host=${MSV3_API_PROXYPASS_HOST:-msv3}
|
||||
msv3_proxypass_port=${MSV3_API_PROXYPASS_PORT:-8080}
|
||||
|
||||
|
||||
#Using the env-variable in docker-compose.yml to populate config.js
|
||||
if [[ ! -z $WEBAPI_URL ]]; then
|
||||
sed -i 's,http\:\/\/MYDOCKERHOST\:PORT,'$WEBAPI_URL',g' /opt/metasfresh-webui-frontend/dist/config.js
|
||||
fi
|
||||
|
||||
if [[ -f "/etc/ssl/certs/cert.pem" ]] && [[ -f "/etc/ssl/certs/privkey.pem" ]]; then
|
||||
if [[ -f "/etc/apache2/certs/fullchain.pem" ]] && [[ -f "/etc/apache2/certs/privkey.pem" ]]; then
|
||||
sed -i 's/\bhttp\b/https/g' /opt/metasfresh-webui-frontend/dist/config.js
|
||||
cat /opt/metasfresh_webui_ssl.conf > /etc/nginx/conf.d/default.conf
|
||||
SSL_ACTIVE="SSL"
|
||||
a2ensite metasfresh_webui_ssl.conf
|
||||
echo "[METASFRESH] Activated SSL!"
|
||||
else
|
||||
sed -i 's/\https\b/http/g' /opt/metasfresh-webui-frontend/dist/config.js
|
||||
cat /opt/metasfresh_webui.conf > /etc/nginx/conf.d/default.conf
|
||||
SSL_ACTIVE="NON-SSL"
|
||||
a2ensite metasfresh_webui.conf
|
||||
a2dissite metasfresh_webui_ssl.conf
|
||||
echo "[METASFRESH] Runnning Non-SSL!"
|
||||
fi
|
||||
|
||||
sed -i 's/WEBUI_API_PROXYPASS_HOST/'${webapi_proxypass_host}'/g' /etc/nginx/conf.d/default.conf
|
||||
sed -i 's/WEBUI_API_PROXYPASS_PORT/'${webapi_proxypass_port}'/g' /etc/nginx/conf.d/default.conf
|
||||
sed -i 's/MSV3_API_PROXYPASS_HOST/'${msv3_proxypass_host}'/g' /etc/nginx/conf.d/default.conf
|
||||
sed -i 's/MSV3_API_PROXYPASS_PORT/'${msv3_proxypass_port}'/g' /etc/nginx/conf.d/default.conf
|
||||
|
||||
|
||||
echo "*************************************************************"
|
||||
echo "Display the variable values we run with"
|
||||
echo "*************************************************************"
|
||||
echo ""
|
||||
echo "WEBUI_API_PROXYPASS_HOST=$webapi_proxypass_host"
|
||||
echo "WEBUI_API_PROXYPASS_PORT=$webapi_proxypass_port"
|
||||
echo ""
|
||||
echo "MSV3_API_PROXYPASS_HOST=$msv3_proxypass_host"
|
||||
echo "MSV3_API_PROXYPASS_PORT=$msv3_proxypass_port"
|
||||
echo ""
|
||||
echo "SSL_ACTIVE=$SSL_ACTIVE"
|
||||
|
||||
|
||||
echo "Start nginx -g 'daemon off;'"
|
||||
nginx -g 'daemon off;'
|
||||
/usr/sbin/apache2ctl -DFOREGROUND
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
### Is this a bug or feature request?
|
||||
|
||||
### What is the current behavior?
|
||||
|
||||
### Which are the steps to reproduce?
|
||||
|
||||
### What is the expected or desired behavior?
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM metasfresh/metasfresh-webapi:5.101
|
||||
FROM metasfresh/metasfresh-webapi:5.61
|
||||
|
||||
COPY sources/configs/* /opt/metasfresh-webui-api/
|
||||
COPY sources/start_webapi.sh /opt/metasfresh-webui-api/
|
||||
|
||||
@@ -25,8 +25,7 @@ wait_dbms()
|
||||
run_metasfresh()
|
||||
{
|
||||
cd /opt/metasfresh-webui-api/ && java -Dsun.misc.URLClassPath.disableJarChecking=true \
|
||||
-Xmx1024M -XX:MaxPermSize=512M \
|
||||
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/metasfresh-webui-api/heapdump \
|
||||
-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError \
|
||||
-DPropertyFile=/opt/metasfresh-webui-api/metasfresh.properties \
|
||||
-Dcom.sun.management.jmxremote.port=1618 \
|
||||
-Dcom.sun.management.jmxremote.authenticate=false \
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
FROM metasfresh/metasfresh-webui:5.101
|
||||
FROM metasfresh/metasfresh-webui:5.61
|
||||
|
||||
COPY sources/certs /etc/ssl/certs
|
||||
COPY sources/configs/config.js /opt/metasfresh-webui-frontend/dist/
|
||||
COPY sources/configs/metasfresh_webui.conf /opt/
|
||||
COPY sources/configs/metasfresh_webui_ssl.conf /opt/
|
||||
|
||||
RUN chown www-data:www-data -R /opt/
|
||||
#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"]
|
||||
|
||||