-
Notifications
You must be signed in to change notification settings - Fork 1
/
installation.html
76 lines (70 loc) · 3.23 KB
/
installation.html
1
2
3
4
5
6
7
8
9
10
11
12
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
layout: installation
title: Installation
permalink: /installation/
---
<div id="service">
<div class="container install">
<div>
<h1>Docker</h1>
For getting GOST to work in Docker there are two images available on Docker Hub:<br/>
For service and dashboard: [https://hub.docker.com/r/geodan/gost/]<br/>
For database: [https://hub.docker.com/r/geodan/gost-db/]<br/>
The docker images can run separately, or running in a combined way using the Dockercompose file.<br/><br/>
If you want to use the latest (unstable) build of GOST, you can use the automated builds found here: [https://hub.docker.com/r/geodan/gost-nightly/] and here: [https://hub.docker.com/r/geodan/gost-db-nightly/] there is no guarantee these images will run correctly.
<h2>Running GOST with Docker-compose</h2>
The easiest way to get GOST including the dependencies running is to simply run the docker-compose file
<pre><code>
$ wget https://raw.githubusercontent.com/gost/docker-compose/master/docker-compose.yml
$ docker-compose up
</code></pre>
<h2>Docker images</h2>
<h3>Running GOST database</h3>
<pre><code>
. $ docker run -p 5432:5432 -e POSTGRES_DB=gost geodan/gost-db
</code></pre>
Connect in pgadmin with localhost:5432 postgres/postgres<br/>
GOST schema is in schema postgres.v1<br/>
<h3>Running GOST service and dashboard</h3>
<pre><code>
$ docker run -p 8080:8080 --link gost-db:gost-db -e gost_db_host=gost-db geodan/gost
</code></pre>
GOST is available at http://localhost:8080<br/>
For making connection to external database use environmental variables gost_db_host, gost_db_port, gost_db_user, gost_db_password:<br/>
For example:<br/>
docker run -p 8080:8080 -t -e gost_db_host=192.168.40.10 -e gost_db_database=gost geodan/gost<br/>
</div>
<div>
<h1>Binaries</h1>
.....<br/>
</div>
<div>
<h1>Building latest version</h1>
1) Install GoLang (https://golang.org/)<br/>
2) Install Postgresql (http://www.postgresql.org/) and PostGIS<br/>
Create a database and run "CREATE EXTENSION postgis;" on it<br/>
3) Clone code<br/>
<pre><code>
git clone https://github.com/Geodan/gost.git
</code></pre>
4) Get dependencies
<pre><code>
go get github.com/gorilla/mux
go get gopkg.in/yaml.v2
go get github.com/lib/pq
go get github.com/eclipse/paho.mqtt.golang
</code></pre>
5) Edit config.yaml or set environment settings to change connection to database<br/>
6) Create GOST schema<br/>
<pre><code>
execute sql found under docker/test1.sql
</code></pre>
7) Start
<pre><code>
go run main.go
</code></pre>
8) In browser open http://localhost:8080/v1.0 to test if the server is running
<br/><br/>
</div>
</div>
</div>