Git Product home page Git Product logo

ui-web's Introduction

ui-web

This is the repository for the web frontend of UC4.

For more information visit uc4.cs.upb.de or one of our other github projects.

Deployment

This project can be deployed using docker.

Setup

We recommend using a proxy server like nginx on the host machine to route the backend API endpoint.

By default, the API will be expected at localhost/api1.

In production builds, this endpoint is configured in the vue.config.js.

Configuration

All configuration which is relevant for deployment can be configured in the vue.config.js file in the root directory of this repository.

Backend API URL

You can configure the API url inside the vue config to change the endpoint at which this application will expect the backend server.

By default, we support three endpoints, depending on the NODE_ENV variable of your shell. On windows cmd:

SET NODE_ENV=production  //to test against production cluster
SET NODE_ENV=development  //to test against develop cluster
SET NODE_ENV=experimental  //to test against experimental cluster

On windows PS:

$env:NODE_ENV="production"
$env:NODE_ENV="development"
$env:NODE_ENV="experimental"

Similarly, the configuration of our jest tests (which are implemented to validate the API and some unit tests), can be configured using On windows cmd:

SET TEST_ENV=production  //to test against production cluster
SET TEST_ENV=development  //to test against develop cluster
SET TEST_ENV=experimental  //to test against experimental cluster

On windows PS:

$env:TEST_ENV="production"
$env:TEST_ENV="development"
$env:TEST_ENV="experimental"

Build docker image

Pre-built images for every version can be found on https://hub.docker.com/r/uc4official/ui-web

If you choose to build the application yourself, you can use docker:

Inside the root directory of this project, run

docker build .

Run docker container

You can build a container using your own image:

docker run -p '8080:80' <image-id>

This will run a new docker container and will map port 8080 of the host machine to port of the container, where the webinterface will be served.

Or you can use a pre-built container from us:

docker run uc4official/ui-web:latest

The container will be configured with the same configuration found in this repository. For more info, view the vue.config.js and docker-compose.yml files.

You can also use docker-compose to run the application, if you are in the root diretory:

docker-compose up

Configuration of docker container

Development Setup

To develop our application, you will need Node.js and an IDE of your choice.

Project setup

npm install

Will install all dependencies for our application.

Compiles and hot-reloads for development

Generate a keypair for localhost tls

openssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout certs/ca-key.pem -out certs/ca-cert.pem -subj '/C=DE/ST=NRW/L=Paderborn/CN=ca-localhost'
openssl req -newkey rsa:4096 -nodes -keyout certs/server-key.pem -out certs/server-req.pem -subj '/C=DE/ST=NRW/L=Paderborn/CN=localhost'
openssl x509 -req -in certs/server-req.pem -days 60 -CA certs/ca-cert.pem -CAkey certs/ca-key.pem -CAcreateserial -out certs/server-cert.pem

Choose a backend deployment:

SET NODE_ENV=production  //to test against production cluster
SET NODE_ENV=development  //to test against develop cluster
SET NODE_ENV=experimental  //to test against experimental cluster

Similarly, the configuration of our jest tests (which are implemented to validate the API and some unit tests), can be configured using On windows cmd:

SET TEST_ENV=production  //to test against production cluster
SET TEST_ENV=development  //to test against develop cluster
SET TEST_ENV=experimental  //to test against experimental cluster

On windows PS:

$env:TEST_ENV="production"
$env:TEST_ENV="development"
$env:TEST_ENV="experimental"

Run the development frontend:

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

ui-web's People

Contributors

bastihav avatar bhermann avatar dependabot[bot] avatar nklsd avatar theovier avatar this-kramer avatar tobias-wiese avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ui-web's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.