Merge pull request #3 from ashvayka/docker-deploy
Added docker deploy scripts
This commit is contained in:
commit
0cf1f5ea4f
1
docker/.env
Normal file
1
docker/.env
Normal file
@ -0,0 +1 @@
|
||||
CASSANDRA_DATA_DIR=/home/docker/cassandra_volume
|
||||
@ -27,5 +27,5 @@ $command rm -f
|
||||
echo "building images.."
|
||||
$command build
|
||||
|
||||
echo "starting cassandra, zookeeper, db-schema images..."
|
||||
$command up -d cassandra zookeeper db-schema
|
||||
echo "starting cassandra, zookeeper, thingsboard-db-schema images..."
|
||||
$command up -d cassandra zookeeper thingsboard-db-schema
|
||||
|
||||
@ -18,7 +18,7 @@ version: '2'
|
||||
|
||||
services:
|
||||
thingsboard:
|
||||
build: thingsboard
|
||||
image: "thingsboard/application:0.1"
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "1883:1883"
|
||||
@ -27,8 +27,6 @@ services:
|
||||
- cassandra:db
|
||||
- zookeeper:zk
|
||||
- thingsboard-db-schema:thingsboard-db-schema
|
||||
volumes:
|
||||
- "../application/target/thingsboard.deb:/root/thingsboard.deb"
|
||||
env_file:
|
||||
- thingsboard.env
|
||||
entrypoint: ./run_thingsboard.sh
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
FROM openjdk:8-jre
|
||||
|
||||
ADD run_thingsboard.sh /root/run_thingsboard.sh
|
||||
ADD thingsboard.deb /root/thingsboard.deb
|
||||
|
||||
RUN chmod +x /root/run_thingsboard.sh
|
||||
|
||||
|
||||
9
docker/thingsboard/build_and_deploy.sh
Executable file
9
docker/thingsboard/build_and_deploy.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp ../../application/target/thingsboard.deb thingsboard.deb
|
||||
|
||||
docker build -t thingsboard/application:0.1 .
|
||||
|
||||
docker login
|
||||
|
||||
docker push thingsboard/application:0.1
|
||||
Loading…
x
Reference in New Issue
Block a user