Skip to content

Commit 74815a0

Browse files
authored
Merge pull request #228 from projecthydra-labs/218-add-docker
Add docker compose config and shell script for launching geoserver
2 parents 5860057 + be2f805 commit 74815a0

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Rails application for developing Hydra Geo models. Built around Curation Concern
2121
1. [GDAL](http://www.gdal.org/)
2222
* You can install it on Mac OSX with `brew install gdal`.
2323
* On Ubuntu, use `sudo apt-get install gdal-bin`.
24+
1. [GeoServer](http://geoserver.org/) (Optional)
2425

2526
## Mapnik
2627

@@ -73,3 +74,43 @@ Then, in another terminal window:
7374
```
7475
$ rake spec
7576
```
77+
78+
## Running GeoServer for Development with Docker
79+
80+
### MacOS
81+
82+
1. Make sure you have docker engine, docker-machine, and docker-compose installed.
83+
- Docker Toolbox: [https://www.docker.com/products/docker-toolbox](https://www.docker.com/products/docker-toolbox)
84+
85+
1. Execute the following command in the geo_concerns directory:
86+
87+
```
88+
$ source ./run-docker.sh
89+
```
90+
91+
### Linux
92+
93+
1. Make sure you have docker engine and docker-compose installed.
94+
- [https://docs.docker.com/engine/installation/linux/](https://docs.docker.com/engine/installation/linux/)
95+
- [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/)
96+
97+
1. Execute the following commands in the geo_concerns directory:
98+
99+
```
100+
$ docker-compose up -d
101+
$ export GEOSERVER_URL="http://localhost:8181/geoserver/rest"
102+
```
103+
104+
## Running GeoServer for Development with Vagrant
105+
106+
1. Make sure you have VirtualBox and Vagrant installed.
107+
- [https://www.virtualbox.org/wiki/Downloads](https://www.virtualbox.org/wiki/Downloads)
108+
- [https://www.vagrantup.com/docs/installation/](https://www.vagrantup.com/docs/installation/)
109+
1. Execute the following commands:
110+
111+
```
112+
$ git clone https://github.com/geoconcerns/geoserver-vagrant.git
113+
$ cd geoserver-vagrant/
114+
$ vagrant up
115+
116+
```

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '2'
2+
services:
3+
rabbitmq:
4+
image: rabbitmq
5+
ports:
6+
- "8081:8080"
7+
geoserver:
8+
image: thinkwhere/geoserver
9+
ports:
10+
- "8181:8080"

run-docker.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
docker-machine start
3+
docker_ip=$(docker-machine ip)
4+
eval $(docker-machine env)
5+
docker-compose up -d
6+
geoserver_url="http://"$docker_ip":8181/geoserver/rest"
7+
export GEOSERVER_URL=$geoserver_url

0 commit comments

Comments
 (0)