IYP Browser is our custom browser for querying the IYP. It serves as an alternative to the Neo4J browser and includes unique features such as query sharing and editor intelligence.
To set up the project, run the following command:
npm install
To start the development server with hot-reloading, use:
npm run dev
To build the project for production, execute:
npm run build
To deploy the project using Docker, follow these steps:
First, clone the repository:
git clone https://github.com/InternetHealthReport/iyp-browser.git
cd iyp-browser
Next, build the Docker image:
docker build -t iyp-browser .
Run the Docker container with the following command:
docker run --name iyp-browser -d -p <host-port>:80 -t iyp-browser
Replace <host-port>
with the port on your host machine where you want to expose the application. After running the container, you can access it at http://localhost:<host-port>/browser
. The project will be deployed in a subpath.
If you want to change or remove the subpath, please modify the following files:
src/plugins/GlobalVariables.js
Dockerfile
default.conf
Make sure to update the relevant configurations in each file to reflect the desired changes to the subpath.
If you want to serve the application behind an Nginx proxy, you need to configure the proxy to point to http://localhost:<host-port>
while ensuring that the location is set to /browser
.
To complete the configuration, add the following rules to prevent caching of static files. This ensures that requests for static files do not redirect to the main page but remain within the subpath:
location ~* .* {
proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_pass http://localhost:<host-port>;
}