Sign inSign up

intocps/dtaas-web

By intocps

•Updated 21 days ago

Website for Digital Twin as a Service software platform

Image
Internet of things
0

5.1K

intocps/dtaas-web repository overview

⁠Client Application — Docker Deployment

This container image provides the client application for Digital Twin as a Service (DTaaS). It delivers a React single-page web application for DTaaS.

⁠Authorisation

The React client website uses OAuth authorisation. The authorisation page⁠ provides details on setting up OAuth authorisation for the client application.

⁠Use in Docker Environment

⁠Create Configuration

The client application requires an env.js configuration file before starting the container. See the config page⁠ for an explanation of client configuration.

Create env.js in the client/ directory with the following contents:

if (typeof window !== 'undefined') {
  window.env = {
    REACT_APP_ENVIRONMENT: 'test',
    REACT_APP_URL: 'http://localhost:4000/',
    REACT_APP_URL_BASENAME: '',
    REACT_APP_URL_DTLINK: '/lab',
    REACT_APP_URL_LIBLINK: '',

    REACT_APP_CLIENT_ID:
      '1be55736756190b3ace4c2c4fb19bde386d1dcc748d20b47ea8cfb5935b8446c',
    REACT_APP_AUTH_AUTHORITY: 'https://gitlab.com/',
    REACT_APP_REDIRECT_URI: 'http://localhost:4000/Library',
    REACT_APP_LOGOUT_REDIRECT_URI: 'http://localhost:4000/',
    REACT_APP_GITLAB_SCOPES: 'openid profile read_user read_repository api',
  };
}

This default configuration works when an account is available on https://gitlab.com⁠. Modify this file as needed for environment-specific values.

The container runs as the node user (uid 1000) from version 1.7.2 on, so env.js must be readable by all users (chmod 644 env.js). When it is not, the website does not load: its scripts fail in the browser and the server stops on the first request for env.js.

⁠Run

Use the following commands to start and stop the container:

docker compose up -d
docker compose down

The website is available at http://localhost:4000⁠.

⁠Missing Workspace

Docker Compose in this setup starts only the client application. This development environment does not include user workspaces or a Traefik gateway running in the background. As a result, the application's not-found page appears with the following heading.

This Page Does Not Exist

The page also shows the unmatched path, so you can see which workspace address the gateway failed to route.

This error appears on the Library and Digital Twins pages. The error is expected.

To run the complete DTaaS application, see the localhost installation documentation: docs⁠.

Tag summary

Content type

Image

Digest

sha256:0c21849b3…

Size

207.5 MB

Last updated

21 days ago

docker pull intocps/dtaas-web