-
Notifications
You must be signed in to change notification settings - Fork 1
/
tutorial_installation_docker.html
75 lines (63 loc) · 3.46 KB
/
tutorial_installation_docker.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
---
layout: tutorials
title: GOST docker installation
permalink: /tutorials-installation-docker/
---
<div id="service">
<div class="container">
<div>
For getting GOST to work in Docker there are three images available on Docker Hub
<li><a href="https://hub.docker.com/r/geodan/gost/">geodan/gost</a>: image containing the GOST server</li>
<li><a href="https://hub.docker.com/r/geodan/gost-db/">geodan/gost-db</a> image containing the PostGIS database</li>
<li><a href="https://hub.docker.com/r/geodan/gost-dashboard/">geodan/gost-dashboard</a> Image containing NGINX and the GOST dashboard</li>
</br>
For more information about the containers check the projects on GitHub:
- <a href="https://github.com/gost/server">server</a>
- <a href="https://github.com/gost/gost-db">gost-db</a>
- <a href="https://github.com/gost/dashboard">gost-dashboard</a>
</br>
The docker images can run separately, or running in a combined way using the docker-compose.yml file.
<h2>Prerequisites</h2>
Verify that Docker is installed with command 'docker info'. This command should display system-wide Docker information.
If this is not the case please install Docker engine, procedure for every platform can be found
<a href="https://docs.docker.com/engine/installation/">here</a>. When using docker-compose be sure that docker-compose
is installed as well. Run command 'docker-compose -- version', version should be 1.10 or greater.
Installation instructions for docker-compose can be found <a href="https://docs.docker.com/compose/install/">here</a>.
<h2>Running GOST with Docker-compose</h2>
The default docker-compose file comes with a MQTT server (Mosquitto) and Node-RED.
</br></br>
Use the tag latest for the latest development version, otherwise use a tag like '0.5' for more stable versions.
</br></br>
<b>Running (unstable) latest build of GOST</b>
</br></br>
<pre><code>
$ wget https://raw.githubusercontent.com/gost/docker-compose/master/docker-compose.yml
$ docker-compose up
</code></pre>
</br>
<b>Running (stable) 0.5 build of GOST</b>
</br></br>
<pre><code>
$ wget https://raw.githubusercontent.com/gost/docker-compose/master/docker-compose-0.5.yml
$ docker-compose -f docker-compose-0.5.yml up
</code></pre>
<h2>Running GOST with docker run</h2>
1) Start geodan/gost-db which creates an user postgres with password postgres and initialises a database named gost</br>
2) Start geodan/gost and set info to connect to gost-db, gost will be available at http://localhost:8080/v1.0</br>
3) Start geodan/gost-dashboard and link gost to use GOST trough nginx, gost + dashboard available at http://localhost:8081
</br></br>
<pre><code>
$ docker run -d -p 5432:5432 -e POSTGRES_DB=gost -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres --name gost-db geodan/gost-db:0.5</br>
$ docker run -d -p 8080:8080 --link gost-db:gost-db -e GOST_DB_HOST=gost-db -e GOST_DB_USER=postgres -e GOST_DB_PASSWORD=postgres --name gost geodan/gost:0.5</br>
$ docker run -d -p 8081:8080 --link gost:gost --name gost-dashboard geodan/gost-dashboard:0.5
</code></pre>
</br>
For making connection to external database use environmental variables GOST_DB_HOST, GOST_DB_PORT, GOST_DB_USER, GOST_DB_PASSWORD.
</br></br>
<pre><code>
$ docker run -d -p 8080:8080 -t -e GOST_DB_HOST=192.168.40.10 -e GOST_DB_DATABASE=gost --name gost geodan/gost:0.5
</code></pre>
</br>
</div>
</div>
</div>