Skip to content

Commit

Permalink
Merge pull request #12 from sitnik/move-dockerfiles
Browse files Browse the repository at this point in the history
Move dockerfiles
  • Loading branch information
tmatvienko authored May 25, 2017
2 parents 648867a + ede3eaf commit 7105908
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 617 deletions.
23 changes: 0 additions & 23 deletions devicehive-admin/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions devicehive-admin/admin-start.sh

This file was deleted.

48 changes: 0 additions & 48 deletions devicehive-admin/nginx.conf

This file was deleted.

5 changes: 0 additions & 5 deletions kafka/Dockerfile

This file was deleted.

76 changes: 0 additions & 76 deletions kafka/start-kafka-zookeper.sh

This file was deleted.

47 changes: 33 additions & 14 deletions rdbms-image/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Installation
[DeviceHive](https://github.com/devicehive/devicehive-java-server) docker container accepts the following environment variables which enable persistent storage in PostgreSQL, message bus support through Apache Kafka and scalable storage of device messages using Apache Cassandra.
[DeviceHive](https://github.com/devicehive/devicehive-java-server) Docker containers accept the following environment variables which enable persistent storage in PostgreSQL, message bus support through Apache Kafka and scalable storage of device messages using Apache Cassandra.

## Configure
### PostgreSQL
Expand All @@ -22,7 +22,7 @@ To enable DeviceHive to communicate over Apache Kafka message bus to scale out a
More configurable parameters at [devicehive-start.sh](devicehive-frontend/devicehive-start.sh) and [devicehive-start.sh](devicehive-backend/devicehive-start.sh).

## Run
In order to run DeviceHive from docker container, define environment variables as per your requirements and run:
In order to run DeviceHive stack in Docker containers, define environment variables as per your requirements and run:
```
docker-compose up
```
Expand All @@ -38,43 +38,45 @@ docker run -p 80:80 -v ./config.xml:/opt/devicehive/config.xml -e _JAVA_OPTIONS=

## Docker-Compose

Below is an example of linking containers with services using [docker-compose](https://docs.docker.com/compose/compose-file/#/version-2).
Below is an example of linking containers with services using [docker-compose](https://docs.docker.com/compose/compose-file/#/version-3).

```
version: "2"
version: "3"
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:0.10.0.1
image: devicehive/devicehive-kafka
ports:
- "9092:9092"
depends_on:
links:
- "zookeeper"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.99.100
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
DH_ZK_ADDRESS: zookeeper
DH_ZK_PORT: 2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
postgres:
image: postgres:9.4.4
image: postgres:9.4
ports:
- "5432:5432"
dh_admin:
build: ../devicehive-admin
image: devicehive/admin-console
ports:
- "80:80"
- "80:8080"
depends_on:
- "dh_frontend"
environment:
DH_HOST: dh_frontend
DH_PORT: 8080
dh_frontend:
build: ./devicehive-frontend
image: devicehive/devicehive-frontend-rdbms
ports:
- "8080:8080"
depends_on:
Expand All @@ -90,10 +92,27 @@ services:
DH_POSTGRES_PORT: 5432
DH_POSTGRES_USERNAME: "postgres"
DH_POSTGRES_PASSWORD: "mysecretpassword"
DH_POSTGRES_DB: "postgres"
DH_BACKEND_ADDRESS: dh_backend
DH_BACKEND_HAZELCAST_PORT: 5701
dh_backend:
image: devicehive/devicehive-backend-rdbms
depends_on:
- "postgres"
- "kafka"
- "zookeeper"
environment:
DH_ZK_ADDRESS: zookeeper
DH_ZK_PORT: 2181
DH_KAFKA_ADDRESS: kafka
DH_KAFKA_PORT: 9092
DH_POSTGRES_ADDRESS: postgres
DH_POSTGRES_PORT: 5432
DH_POSTGRES_USERNAME: "postgres"
DH_POSTGRES_PASSWORD: "mysecretpassword"
DH_POSTGRES_DB: "postgres"
```

Enjoy!




38 changes: 0 additions & 38 deletions rdbms-image/devicehive-backend/Dockerfile

This file was deleted.

33 changes: 0 additions & 33 deletions rdbms-image/devicehive-backend/devicehive-start.sh

This file was deleted.

40 changes: 0 additions & 40 deletions rdbms-image/devicehive-frontend/Dockerfile

This file was deleted.

Loading

0 comments on commit 7105908

Please sign in to comment.