Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
merged with master
Browse files Browse the repository at this point in the history
  • Loading branch information
emepyc committed Feb 6, 2017
2 parents cb129e0 + deac0a0 commit 52f5ee4
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 134 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# CTTV Web App
[![Docker Repository on Quay](https://quay.io/repository/opentargets/webapp/status "Docker Repository on Quay")](https://quay.io/repository/opentargets/webapp)

This is the web app for the CTTV project, based on the CoreDB API.
[![wercker status](https://app.wercker.com/status/11b0582ab0336ded75ef289929e9b83d/s/master "wercker status")](https://app.wercker.com/project/byKey/11b0582ab0336ded75ef289929e9b83d)

# OpenTargets Web App

This is the web app for the Open Targets Platform, based on the Open Targets API.
The app is based on Angular, while D3 is used for visualization and graphs.


Expand All @@ -9,7 +13,7 @@ Clone the repository and install the dependencies.


### Prerequisites
You'll obvoiously need git to clone the repository.
You'll obviously need `git` to clone the repository.

Installation and tests need some node.js tools:
you must have `node.js` and its package manager `npm` installed. You can get them from [http://nodejs.org/](http://nodejs.org/)
Expand Down Expand Up @@ -40,16 +44,14 @@ Angular code is installed via Bower includes:
* D3

## Running and deploying the app
To test your app, you can just run the included simple `http-server` by running:
```
npm start
```
Then go to
```
http://localhost:8000/app/
```

All the code you need for deployment is contained in
```
/app
After building with `npm install` and `npm run setup`, all the code you need for deployment will be contained in `/app`.

A docker container with a compiled version of the webapp from a NGINX web server is available.
To run the app locally using the container:
```sh
docker run -d -p 8443:443 -p 8080:80 quay.io/opentargets/webapp
```
Then visit https://localhost:8443

The standard container comes with self-signed certificates, so you will have click through a couple of security warnings to get to the app.
14 changes: 7 additions & 7 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
<meta property="og:image" content="https://www.targetvalidation.org/imgs/logo/ot_logo_splash.png" />


<link rel="stylesheet" href="build/cttvWebapp-3rdParty.css?v=27012017" />
<link rel="stylesheet" href="build/OpenTargetsWebapp-3rdParty.css?v=27012017" />
<!-- Don't bundle font-awexome.min.css or the woff files would be broken -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!-- <link href="build/fontawesome/css/font-awesome.min.css?v=16112015" rel="stylesheet" />
<link href="build/bootstrap/dist/css/bootstrap.min.css?v=08122015" rel="stylesheet" />-->
<link rel="stylesheet" href="build/cttvWebapp.min.css?v=27012017" />
<link rel="stylesheet" href="build/OpenTargetsWebapp.min.css?v=27012017" />

<!-- Components -->
<link rel="stylesheet" href="build/components-cttvWebapp.min.css?v=27012017" />
<link rel="stylesheet" href="build/components-OpenTargetsWebapp.min.css?v=27012017" />

<!-- IE(9) doesn't create console object if not in debug mode. This makes sure it doesn't throw an exception -->
<script type="text/javascript" src="js/ie_console_noop.js?v=27012017"></script>
Expand All @@ -51,7 +51,7 @@
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet"> -->

<!-- App CSS at the end, to override anything required
<link rel="stylesheet" href="build/cttvWebapp.min.css?v=08122015" />-->
<link rel="stylesheet" href="build/OpenTargetsWebapp.min.css?v=08122015" />-->


<style>
Expand Down Expand Up @@ -222,11 +222,11 @@
<script src="jspm_packages/system.js"></script>

<!-- Angular && web app -->
<script src="build/cttvWebapp-3rdParty.js?v=27012017" type="text/javascript"></script>
<script src="build/cttvWebapp.min.js?v=27012017" type="text/javascript"></script>
<script src="build/OpenTargetsWebapp-3rdParty.js?v=27012017" type="text/javascript"></script>
<script src="build/OpenTargetsWebapp.min.js?v=27012017" type="text/javascript"></script>

<!-- Components -->
<script type="text/javascript" src="build/components-cttvWebapp.min.js?v=27012017"></script>
<script type="text/javascript" src="build/components-OpenTargetsWebapp.min.js?v=18012017"></script>

<!-- Blob.js (needed by FileSaver) -->
<script type="text/javascript" language="javascript" src="vendor/Blob.js"></script>
Expand Down
4 changes: 1 addition & 3 deletions app/js/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ angular.module('cttvDirectives', [])
var pngExporter = tnt.utils.png()
.filename(scope.filename || "image.png")
.scale_factor(scope.currScale)
.stylesheets(['components-cttvWebapp.min.css'])
.stylesheets(['components-OpenTargetsWebapp.min.css'])
.limit({
limit: 2100000,
onError: function () {
Expand Down Expand Up @@ -1720,5 +1720,3 @@ angular.module('cttvDirectives', [])
link: function(scope, element, attrs) {}
};
}])


18 changes: 5 additions & 13 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
#!/bin/bash
#!/bin/sh


export REST_API_SCHEME=${REST_API_SCHEME:=https}
export REST_API_SERVER=${REST_API_SERVER:=www.targetvalidation.org:443}
export ENSEMBL_API_KEY=${ENSEMBL_API_KEY:=YOUR_KEY_HERE}

# substitute the rest API address in the nginx configuration

envsubst < /etc/nginx/conf.d/app_server.template > /etc/nginx/conf.d/app_server.conf
envsubst '$REST_API_SCHEME:$ENSEMBL_API_KEY' < /etc/nginx/conf.d/rest_api_scheme.template > /etc/nginx/conf.d/rest_api_scheme.conf

echo "======================================="
echo "TESTING CONNECTION TO REST API ..."
echo "POINTING TO REST API"
echo at ${REST_API_SCHEME}://${REST_API_SERVER}
echo ""

curl -k --max-time 30 --connect-timeout 10 ${REST_API_SCHEME}://${REST_API_SERVER}/api/latest/public/utils/ping

echo "======================================="
echo "Checking REST API version ..."
echo ""

curl -k --max-time 30 --connect-timeout 10 ${REST_API_SCHEME}://${REST_API_SERVER}/api/latest/public/utils/version


# As argument is not related to elasticsearch,
# then assume that user wants to run his own process,
# assume that user wants to run his own process,
# for example a `bash` shell to explore this image
exec "$@"
31 changes: 0 additions & 31 deletions k8-webapp-deployment.yml.template

This file was deleted.

21 changes: 0 additions & 21 deletions k8-webapp-svc.yml.template

This file was deleted.

6 changes: 3 additions & 3 deletions nginx_conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
user www-data;
user nginx;

worker_processes 4;

Expand Down Expand Up @@ -66,8 +66,8 @@ http {

root /var/www/app/;

ssl_certificate /usr/share/nginx_crt/server.crt;
ssl_certificate_key /usr/share/nginx_crt/server.key;
ssl_certificate /usr/share/nginx/server.crt;
ssl_certificate_key /usr/share/nginx/server.key;

set $no_cache "1";#$http_clear_cache;
if ($request_uri ~ .*request_token.*) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cttvWebapp",
"name": "OpenTargetsWebapp",
"version": "0.0.1",
"description": "Web application for CTTV project 003",
"description": "Open Targets Platform frontend",
"readme": "README.md",
"license": "",
"devDependencies": {
Expand Down
21 changes: 0 additions & 21 deletions shippable.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
build:
<<<<<<< HEAD
ci:
- echo 'CI is running.. wish i knew what to test'
=======
cache: true
ci:
- echo 'some test should go here..'
>>>>>>> master
post_ci:
- docker build -t="opentargets/webapp:$BRANCH.$BUILD_NUMBER" .
# Pushing to 2 different registries
Expand All @@ -17,22 +12,6 @@ build:
- docker tag opentargets/webapp:$BRANCH.$BUILD_NUMBER eu.gcr.io/open-targets/webapp:$BRANCH.$BUILD_NUMBER
- docker push eu.gcr.io/open-targets/webapp:$BRANCH.$BUILD_NUMBER

<<<<<<< HEAD
integrations:
# deploy:
# # Public Image (docker)
# - integrationName: "GKE-opentargets"
# type: gke
# target: GKE-opentargets
# application_name: "webapp"
# env_name: "cluster-dev"
# image_name: "opentargets/webapp"
# image_tag: "$BRANCH.$BUILD_NUMBER"
#


=======
>>>>>>> master
hub:
- integrationName: hub_docker
type: docker
Expand Down
Loading

0 comments on commit 52f5ee4

Please sign in to comment.