thingsboard-developers

Details

diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index fd1c0a1..b15b7fa 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -18,7 +18,7 @@ version: '2'
 
 services:
   thingsboard:
-    image: "thingsboard/application:0.1"
+    image: "thingsboard/application:1.0"
     ports:
       - "8080:8080"
       - "1883:1883"
@@ -31,15 +31,11 @@ services:
       - thingsboard.env
     entrypoint: ./run_thingsboard.sh
   thingsboard-db-schema:
-    build: thingsboard-db-schema
+    image: "thingsboard/thingsboard-db-schema:1.0"
     links:
       - cassandra:db
     env_file:
       - thingsboard-db-schema.env
-    volumes:
-      - "../dao/src/main/resources/schema.cql:/root/schema.cql"
-      - "../dao/src/main/resources/demo-data.cql:/root/demo-data.cql"
-      - "../dao/src/main/resources/system-data.cql:/root/system-data.cql"
     entrypoint: ./install_schema.sh
   cassandra:
     image: "cassandra:3.9"
diff --git a/docker/thingsboard/build_and_deploy.sh b/docker/thingsboard/build_and_deploy.sh
index 937ac4b..acbb420 100755
--- a/docker/thingsboard/build_and_deploy.sh
+++ b/docker/thingsboard/build_and_deploy.sh
@@ -18,8 +18,8 @@
 
 cp ../../application/target/thingsboard.deb thingsboard.deb
 
-docker build -t thingsboard/application:0.1 .
+docker build -t thingsboard/application:1.0 .
 
 docker login
 
-docker push thingsboard/application:0.1
\ No newline at end of file
+docker push thingsboard/application:1.0
\ No newline at end of file
diff --git a/docker/thingsboard/run_thingsboard.sh b/docker/thingsboard/run_thingsboard.sh
index 6207973..c41e53e 100755
--- a/docker/thingsboard/run_thingsboard.sh
+++ b/docker/thingsboard/run_thingsboard.sh
@@ -40,5 +40,5 @@ echo "Starting 'Thingsboard' service..."
 service thingsboard start
 
 # Wait until log file is created
-sleep 3
+sleep 10
 tail -f /var/log/thingsboard/thingsboard.log
diff --git a/docker/thingsboard-db-schema/build_and_deploy.sh b/docker/thingsboard-db-schema/build_and_deploy.sh
new file mode 100755
index 0000000..5dd115c
--- /dev/null
+++ b/docker/thingsboard-db-schema/build_and_deploy.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+cp ../../dao/src/main/resources/schema.cql schema.cql
+cp ../../dao/src/main/resources/demo-data.cql demo-data.cql
+cp ../../dao/src/main/resources/system-data.cql system-data.cql
+
+docker build -t thingsboard/thingsboard-db-schema:1.0 .
+
+docker login
+
+docker push thingsboard/thingsboard-db-schema:1.0
\ No newline at end of file
diff --git a/docker/thingsboard-db-schema/Dockerfile b/docker/thingsboard-db-schema/Dockerfile
index 12e7dc7..5696980 100644
--- a/docker/thingsboard-db-schema/Dockerfile
+++ b/docker/thingsboard-db-schema/Dockerfile
@@ -23,4 +23,8 @@ RUN apt-get update \
 
 RUN chmod +x /root/install_schema.sh
 
+ADD schema.cql /root/schema.cql
+ADD demo-data.cql /root/demo-data.cql
+ADD system-data.cql /root/system-data.cql
+
 WORKDIR /root