-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hisham waleed karam
committed
Oct 14, 2018
1 parent
7359b03
commit 0948cb7
Showing
25 changed files
with
625 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
sudo: required | ||
language: go | ||
go: | ||
- "1.9.x" | ||
- "1.10.x" | ||
- "1.11.x" | ||
services: | ||
- docker | ||
env: | ||
- DOCKER_COMPOSE_VERSION=1.20.1 | ||
addons: | ||
hosts: | ||
- postgis | ||
- geoserver | ||
before_install: | ||
- sudo rm /usr/local/bin/docker-compose | ||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose | ||
- chmod +x docker-compose | ||
- sudo mv docker-compose /usr/local/bin | ||
- sudo apt-get install realpath -y | ||
- sudo apt-get purge 'postgresql-*' -y | ||
- sudo apt-get autoremove 'postgresql-*' -y | ||
- echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | sudo tee -a /etc/apt/sources.list | ||
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | ||
- sudo apt-get update -qq | ||
- sudo apt-get install postgresql-client-10 -y | ||
- sudo chmod +x ./scripts/*.sh | ||
- sudo ./scripts/gdal.sh | ||
- go get golang.org/x/tools/cmd/cover | ||
- go get github.com/mattn/goveralls | ||
- go get -u github.com/lukeroth/gdal | ||
- docker-compose build | ||
- docker-compose up -d | ||
- docker ps | ||
script: | ||
- bash -c "./scripts/postgis.sh && ./scripts/entry.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package gismanager | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestBuildConnectionString(t *testing.T) { | ||
ds := datastore{ | ||
Host: "localhost", | ||
Port: 5432, | ||
DBName: "gis", | ||
DBUser: "gis", | ||
DBPass: "gis", | ||
} | ||
conn := ds.BuildConnectionString() | ||
assert.NotNil(t, conn) | ||
assert.NotEqual(t, "", conn) | ||
assert.True(t, pgRegex.Match([]byte(conn))) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '3' | ||
|
||
services: | ||
geoserver: | ||
image: cartoview/geoserver_docker:tomcat | ||
restart: unless-stopped | ||
hostname: geoserver | ||
build: | ||
context: ./ | ||
dockerfile: docker/Dockerfile | ||
user: root | ||
ports: | ||
- "8080:8080" | ||
postgis: | ||
image: kartoza/postgis:10.0-2.4 | ||
volumes: | ||
- 'postgis-data:/var/lib/postgresql' | ||
environment: | ||
- POSTGRES_DB=gis | ||
- POSTGRES_USER=golang | ||
- POSTGRES_PASS=golang | ||
- ALLOW_IP_RANGE=0.0.0.0/0 | ||
ports: | ||
- 5432:5432 | ||
restart: unless-stopped | ||
volumes: | ||
postgis-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM tomcat:9.0.4-jre8 | ||
LABEL "MAINTAINER"="Cartologic Development Team" | ||
ENV JAVA_HOME /usr/lib/jvm/default-java | ||
ENV GEOSERVER_VERSION 2.13.0 | ||
RUN ln -s /usr/lib/jvm/java-8-openjdk-amd64 /usr/lib/jvm/default-java | ||
RUN apt-get autoremove --purge -y openjdk-8-jre-headless && \ | ||
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true \ | ||
| debconf-set-selections && \ | ||
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" \ | ||
> /etc/apt/sources.list.d/webupd8team-java.list && \ | ||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get update && \ | ||
apt-get install -y oracle-java8-installer oracle-java8-set-default && \ | ||
ln -s --force /usr/lib/jvm/java-8-oracle /usr/lib/jvm/default-java | ||
|
||
RUN cd /tmp && \ | ||
wget https://netix.dl.sourceforge.net/project/geoserver/GeoServer/${GEOSERVER_VERSION}/geoserver-${GEOSERVER_VERSION}-war.zip | ||
RUN unzip /tmp/geoserver-${GEOSERVER_VERSION}-war.zip -d /tmp/geoserver | ||
RUN mv /tmp/geoserver/geoserver.war /usr/local/tomcat/webapps | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.