fablab-html is an TypeScript and HTML5 based web application that uses a Dropwizard based REST-server.
It can be installed using two different methods.
###1. Using Docker container
Docker container can be created and started using scripts in the docker subdirectory. Inside the docker container an apache server will be started using the configuration provided. It will start a web server listening on port 80 (http) and 443 (https). mod_rewrite will be used to forward http requests to https. mod_proxy will be used to forward requests to the REST-Server. URL to REST-Server should be changed in apache-vhost-ssl.conf.
SSL Certificates for apache web server should be placed in docker subdirectory. There is a helper script available to export a certificate from a Java keystore.
###2. Using existing apache instance
Required is an apache server with following modules (other web servers should work as well, if they support redirecting requests similar to mod_proxy):
- mod_php
- mod_proxy
For use with ssl (recommended) there might be additional modules required:
- mod_ssl
- mod_rewrite
To forward all requests to the REST-Server configuration of mod_proxy is required. Example configuration:
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
# specify endpoint to rest server using mod_proxy:
ProxyPass /api https://url.to.rest.server.de:433
ProxyPassReverse /api https://url.to.rest.server.de:433
TypeScript files need to be compiled by the TypeScript compiler. Simply call build script to get this step executed.
./build.sh
To cleanup the mess before deploying the sources to the web server root some files and directories can be removed
./deployCleanup.sh
Feel free to contact us: [email protected]