GithubHelp home page GithubHelp logo

khnafiz / meddream-setup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shudarshon/meddream-setup

1.0 0.0 0.0 33.84 MB

just a fun for serving PHP app with nginx and apache. not receommended to do so

PHP 76.93% Batchfile 1.41% Shell 1.77% CSS 1.42% JavaScript 15.50% HTML 2.98%

meddream-setup's Introduction

Installing Meddream Viewer on Ubuntu EC2 Instance

MedDream is a web based DICOM Viewer. DICOM is a standard for storing and transmitting medical images. In this repository, I am going to setup meddrream viewer on Ubutu AWS machine.

Meddream is a PHP application and both nginx and apache web server will be used in the scenario. Although NGINX and apache is capable of serving PHP application independently but I have done this staff as a fun. Nginx will reverse proxy requests to apache and apache web server will serve the application. In order to run this script we have to make sure that fabric library is installed in the host machine. To install fabric,

$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
$ python get-pip.py
$ pip install fabric

or you can install fabric using package manager.

$ sudo apt-get install fabric

For aws instance, edit the username, keyfile location and server address in fabfile.py. But if you use vagrant or any other server with password based ssh then edit env.user value and uncomment env.password and set new password value. Finally, comment out the env.key_filename field.

def app():
    print "Connecting to Server"

    env.setup = True
    env.user = 'ubuntu'
    env.ubuntu_version = '16.04'
    env.warn_only = True
    #env.password = 'SSH_PASSWORD'
    env.key_filename = abspath('/home/ubuntu/keyfile/key.pem')
    env.abort_exception = FabricException

    env.hosts = [
        'A.B.C.D'   #server_ip_address
    ]

Next, we need to also edit the IP address in the nginx configuration file. Edit the devops/viewer_ng.conf file and set the IP address of the server.

server {
        listen 80;
        server_name A.B.C.D;  #server_ip_address

        location /meddream {	#this portion will handle the requests for meddream web application
                proxy_pass http://127.0.0.1:8080;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

Now, run the fabric script and install the application.

fab app install deploy

Next, browse to the following link to view the application.

http://server_ip_address/meddream

Here, two web servers are used because nginx will serve another application which will trigger meddream application.

meddream-setup's People

Contributors

shudarshon avatar

Stargazers

Roman avatar

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.