Skip to content

Commit

Permalink
Added postgis
Browse files Browse the repository at this point in the history
  • Loading branch information
alainbodiguel committed Apr 15, 2021
1 parent 02d0e2d commit 1092d8d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
27 changes: 27 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,33 @@ services:
- arlas-server
- arlas-persistence-server
- arlas-permissions-server
postgis:
container_name: postgis
restart: unless-stopped
image: postgis/postgis:latest
environment:
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
#- /home/user/projects/postgis/data:/var/lib/postgresql/data
- ${PG_DATADIR}:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: tech@gisaia.com
PGADMIN_DEFAULT_PASSWORD: secret
PGADMIN_LISTEN_PORT: 80
ports:
- "8080:80"
volumes:
# on your local host: chmod -R 777 /home/user/projects/postgis/pgadmin
#- /home/user/projects/postgis/pgadmin/servers.json:/pgadmin4/servers.json
#- /home/user/projects/postgis/pgadmin/data:/var/lib/pgadmin
- ${PGA_CONFIG}:/pgadmin4/servers.json
- ${PGA_DATADIR}:/var/lib/pgadmin
volumes:
esdata1:
driver: local
Expand Down
14 changes: 10 additions & 4 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,20 @@ ready_message(){
echo $arlas_server_running_msg
echo "############################################"
echo " "
if [ "$ignore_es" = false ];
then
echo "############################################"
echo $es_running_msg
echo $es_running_node_msg
echo $es_enables_sniffing_msg
echo $es_enable_ssl_msg
echo $es_credentials_msg
echo $es_index_msg
echo "############################################"
echo " "
fi
echo "############################################"
echo "pgAdmin is running on http://localhost:8080/browser/"
}

usage(){
Expand Down Expand Up @@ -74,7 +81,7 @@ unset ES_SNIFFING
unset ES_CREDENTIALS
unset ARLAS_ELASTIC_INDEX

docker_compose_services="arlas-wui, arlas-builder, arlas-hub, nginx, arlas-server, elasticsearch, arlas-persistence-server, arlas-permissions-server"
docker_compose_services="arlas-wui, arlas-builder, arlas-hub, nginx, arlas-server, elasticsearch, arlas-persistence-server, arlas-permissions-server, postgis, pgadmin"
IFS=', ' read -r -a docker_compose_services_array <<< "$docker_compose_services"

ignore_es=false
Expand Down Expand Up @@ -174,7 +181,7 @@ fi
if [ ! -z ${ES_CLUSTER+x} ];
then
if [ "$ignore_es" != false ]; then
echo "WARNING : You have setted an arlas-server url, all the paramaters link to elasticsearch are ignored. "
echo "WARNING : You have set an arlas-server url, all the paramaters link to elasticsearch are ignored. "
else
if [ -z ${ES_NODE+x} ];
then
Expand Down Expand Up @@ -264,9 +271,8 @@ if [ "$ignore_arlas" = true ];
eval "docker-compose -f $SCRIPT_DIRECTORY/docker-compose.yaml stop arlas-server"
eval "docker-compose -f $SCRIPT_DIRECTORY/docker-compose.yaml rm --force arlas-server"
#No local service to waiting for
ready_message
exit 0
fi

if [ "$ignore_es" = true ];
then
eval "docker-compose -f $SCRIPT_DIRECTORY/docker-compose.yaml stop elasticsearch"
Expand Down

0 comments on commit 1092d8d

Please sign in to comment.