README.md 1.39 KB
Newer Older
1 2 3 4 5 6 7 8 9
# x3dom + leaflet

You can either run the demo:
- On a web server with PHP support
- Using the "Standalone installation" instructions below (could taint your system)
- Using the "Docker image" instructions below (without tainting your system)

## 1. Standalone installation
### 1.1. Install dependencies
Luc Deschenaux's avatar
Luc Deschenaux committed
10 11 12

You need php-cgi installed.

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
Change to the x3domlet directory
```
cd x3domlet
```

If you don't have nodejs installed you may install it as a standard user through nvm with the following command:
```
docker/install-nodejs.sh
```

When nodejs is installed you can run:
```
npm install && bower install
```

### 1.2. Copy the test data
You need to copy the data to be displayed in directories models/ and kml/

### 1.3. Run the test server and open a browser window
File modifications will trigger the page reload
```
gulp
```

## 2. Docker image

The docker image allow you to run the demo in a virtual container
without tainting your system.

The current user should be allowed to run docker. Otherwise use 'sudo'.

### 2.1. Build the docker image
- Change to the ./docker directory.
- Run "make" to build the docker image.

### 2.2. Test
From the directory containing the "/models" and "/kml" folders you want to use, run:
```
x3domlet/docker/run.sh
```
It will start the x3domlet docker image and open a browser window.
On exit the script should stop and (WARNING) will remove the container and associated volumes.