A web frontend for MottainaiCI
A Dockerfile is included which will build and serve the app.
API requests will be proxied to the MottainaiCI server endpoint defined by the API_URL
environment variable. e.g.
$> docker build -t mott-web .
$> docker run --rm -e API_URL=https://mottainai.example.com mott-web:latest
# install dependencies
$> npm install
# install preact cli if not available on system
$> npm i -D preact-cli
# serve with hot reload at localhost:30000
# API requests will be proxied to http://localhost:9090
# You can configure this and more in preact.config.js
# or through environment variables.
$> npm run dev
- Build console application
$> npm run build
Of if you want to change the base path it's possible only at build time.
$> APP_PREFIX=/mottainai-dashboard/ npm run build
- Run Dashboard
$> API_URL="http://mottainai-server.mottainai.local:19090" node proxy.js
or if you have built the application with APP_PREFIX
$> export APP_PREFIX="/mottainai-dashboard/"
$> export API_URL="http://mottainai-server.mottainai.local:19090"
$> node proxy.js
Env | Default | Description |
---|---|---|
PORT | 3000 | Binding port. |
HOST | 0.0.0.0 | Binding address. |
INSECURE | false | Accept self signed certificates from Mottainai Server |
STATIC_DIR | $PWD/build | Path of the static files. |
APP_PREFIX | / | Base path. |
USE_SSL | false | Enable HTTPS (requires PRIVATE_KEYFILE and CERT_FILE) |
PRIVATE_KEYFILE | "" | Define the path of private key. |
CERT_FILE | "" | Define the path of the .crt file. |
SIGNUP_ENABLE | "" | Enable Signup feature available if enabled also on Mottainai Server settings. |