In addition to the web application, the Sandtank application may be ran on a personal computer. Because running the application requires Docker, administrator privileges are required.
To run the application on a local computer, follow these instructions:
- Download and install Docker.
- Open a terminal.
- On Windows, open a command prompt with administrator privileges.
- On Mac/Linux, open a terminal. You will either have to use
sudo
with the docker commands, or set up docker to run without sudo.
Ensure you can run docker by running in the terminal:
$ docker info
Pull the application by running:
$ docker pull hydroframe/sandtank
When it finishes downloading, run:
$ docker run -p 9000:80 -it hydroframe/sandtank
Access the application by opening a web browser at http://localhost:9000/
Using Custom Templates
To use custom templates, follow these steps:
First, follow steps 1-5 for creating a new template.
To try it out, follow the steps for Running the Application, except, for the
docker run
command, add an additional argument like the following:$ docker run -p 9000:80 -it -v /path/to/templates:/pvw/simulations/templates hydroframe/sandtank
where /path/to/templates
is the path to your local templates
directory. This will replace the templates
directory inside the docker container with your local one.
Access the application by appending
?name=<template_name>
to the end of the web url, where<template_name>
is the name of your new template directory. For example, http://localhost:9000/?name=NewTemplate.To update the application after modifying the new template files, simply refresh the page in the browser.
After you are satisfied with the new template, consider contributing it to the project by following the Contributing Templates instructions.