Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Docker config updates

Rich Turner78935edafe53
diff --git a/postgresql/Dockerfile b/postgresql/Dockerfile
index ba4cb662a..23fa4c72f 100644
--- a/postgresql/Dockerfile
+++ b/postgresql/Dockerfile
@@ -32,7 +32,6 @@ RUN curl -L -o /usr/local/bin/gosu https://github.com/tianon/gosu/releases/downl
# Prepare data directory
ENV PGDATA /data
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA"
-VOLUME ${PGDATA}
# Some defaults
ENV PG_BIN=/usr/pgsql-${PG_VERSION}/bin
diff --git a/postgresql/entrypoint.sh b/postgresql/entrypoint.sh
index f372b5315..6088df27e 100644
--- a/postgresql/entrypoint.sh
+++ b/postgresql/entrypoint.sh
@@ -48,6 +48,10 @@ else
echo "Using existing database(s) in: ${PGDATA}"
fi
+# Set permissions as on windows permissions will be too relaxed for postgreSQL
+chmod -R 0700 ${PGDATA}
+
echo "Starting database server..."
-gosu postgres ${PG_BIN}/pg_ctl start -w "$@"
-/bin/bash -c "trap : TERM INT; sleep infinity & wait"
\ No newline at end of file
+exec gosu postgres ${PG_BIN}/postgres "$@"
+#gosu postgres ${PG_BIN}/pg_ctl start -w "$@"
+#/bin/bash -c "trap : TERM INT; sleep infinity & wait"
\ No newline at end of file
diff --git a/profile/demo.yml b/profile/demo.yml
index 6d0be50bc..6e4e1bc4c 100644
--- a/profile/demo.yml
+++ b/profile/demo.yml
@@ -15,7 +15,10 @@
#
# This file defines the services to run and their dependencies only.
#
-version: '2.1'
+version: '2.2'
+
+volumes:
+ data:
services:
diff --git a/profile/deploy.yml b/profile/deploy.yml
index cbc687905..be58619f5 100644
--- a/profile/deploy.yml
+++ b/profile/deploy.yml
@@ -11,7 +11,7 @@
#
# All persistent data is stored on your Docker host in the '${DEPLOYMENT_DIRECTORY:-../deployment}' directory.
#
-version: '2.1'
+version: '2.2'
services:
diff --git a/profile/dev.yml b/profile/dev.yml
index 6952b3507..83665edb2 100644
--- a/profile/dev.yml
+++ b/profile/dev.yml
@@ -1,6 +1,10 @@
# Profile for doing development on all services.
# Starts keycloak with theme volumed mapped and postgres and exposes them to localhost.
-version: '2.1'
+version: '2.2'
+
+volumes:
+ postgresql-data:
+
services:
keycloak:
@@ -24,4 +28,6 @@ services:
file: deploy.yml
service: postgresql
ports:
- - "5432:5432"
\ No newline at end of file
+ - "5432:5432"
+ volumes:
+ - postgresql-data:/data
\ No newline at end of file