This project reads the following environment variable:
-
LANTERN_GRAFANA_URL: The grafana dashboard url that is being used for displaying visualizations. Note: The given url should start with either
http
orhttps
.Default value: ""
Run ng serve
for the dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
If you do not have Angular in your development environment you may have to run the folllowing:
yarn install -g @angular/cli
yarn install --save-dev @angular-devkit/build-angular
For more information on running and set-up, visit the wiki.
To run with the nginx server (on a Mac):
- Install nginx:
brew install nginx
- Copy the local nginx config file
lantern.conf
to/usr/local/etc/nginx/servers/
- Make
lantern
directory in the nginx file system:mkdir /usr/local/var/www/lantern
- Make sure you have built the production version of this project:
ng build --prod
- Copy the
dist
directory so nginx can run it:cp ./dist/lantern-app/* /usr/local/var/www/lantern/
- Start the server:
- If you already have nginx running:
sudo nginx -s reload
- If nginx is not running:
sudo nginx
- Or, to be more specific:
sudo nginx -c /usr/local/etc/nginx/nginx.conf
- Go to
localhost:8090
To stop the server:
- Option 1:
sudo nginx -c /usr/local/etc/nginx/nginx.conf -s stop
- Option 2:
sudo nginx -s stop
To run without using the docker-compose command:
First build the image:
docker build --build-arg cert_dir=./certs -t lantern_front_end .
Then run the container:
docker run --name lantern_front_end_container -d -p 8090:80 lantern_front_end
Then go to localhost:8090
If you are operating behind a proxy that does SSL-Inspection, yarn needs to be configured with the certificates that are used by the proxy in the image. Currently, the docker build
command requires a certs
directory as an argument to the Dockerfile
. If you are operating behind an SSL-Inspecting proxy you will have to copy your certificates into this directory. The Dockerfile
also expects that the root certificate will exist as part of the file ca-certificates.crt
.
To push the front-end to our Docker Hub public repository, run:
docker build -t <image name> .
docker tag <image name> onchealthit/lantern-front-end
docker push onchealthit/lantern-front-end
You can also combine steps one and two by running:
docker build -t onchealthit/lantern-front-end .
Copyright 2019 The MITRE Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.