Skip to content

Commit

Permalink
modified sdk compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
tlodge committed Sep 12, 2017
1 parent 2ae1eb9 commit cacf89c
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 98 deletions.
25 changes: 3 additions & 22 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ services:
- DATABOX_CM.pem
depends_on:
- arbiter
- app-server
deploy:
replicas: 1
placement:
Expand Down Expand Up @@ -78,25 +77,7 @@ services:
constraints:
- 'node.role == manager'

app-server:
build:
context: ./platform-app-server
dockerfile: Dockerfile${DATABOX_ARCH}
image: ${DOCKER_REPO}app-server
environment:
- "LOCAL_MODE=1"
- "PORT=8181"
ports:
- '8181:8181'
networks:
- databox-cloud-net
- databox-cm-app-server-net
deploy:
replicas: 1
placement:
constraints:
- 'node.role == manager'


secrets:
DATABOX_ROOT_CA:
file: ./certs/containerManager.crt
Expand All @@ -122,5 +103,5 @@ networks:
driver: overlay
databox-app-net:
driver: overlay
databox-cloud-net:
driver: overlay
# databox-cloud-net:
# driver: overlay
28 changes: 10 additions & 18 deletions docker-databox-appstore.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
app-server:
build:
context: ./platform-app-server
dockerfile: Dockerfile${DATABOX_ARCH}
image: ${DOCKER_REPO}app-server
environment:
- "LOCAL_MODE=1"
- "PORT=8181"
ports:
- '8181:8181'
networks:
# - databox-cloud-net
- databox-cm-app-server-net
deploy:
replicas: 1
placement:
constraints:
- 'node.role == manager'
app-server:

image: ${DOCKER_REPO}app-server

environment:
- "LOCAL_MODE=1"
- "PORT=8181"

ports:
- '8181:8181'
96 changes: 41 additions & 55 deletions docker-databox-sdk.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,45 @@
version: '3.1'
redis:
image:
tlodge/databox-redis
ports:
- "6379"

services:
redis:
image:
tlodge/databox-redis
ports:
- "6379"
mongo:
image:
tlodge/mongo
ports:
- "27017"
command:
/usr/bin/mongod --dbpath /data/mongo --smallfiles

mongo:
image:
tlodge/mongo
ports:
- "27017"
command:
/usr/bin/mongod --dbpath /data/mongo --smallfiles
mock-datasource:
image:
tlodge/databox-datasource-mock
command:
/root/start.sh

app-server:
image:
tlodge/databox-app-server
ports:
- "8091"
links:
- mongo
command:
/root/start.sh

databox-sdk:
image:
tlodge/databox-sdk
links:
- redis
- mongo
ports:
- "8086:8086"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOSTMOUNT}/sdk:/usr/src/app/conf
command:
node index.js

mock-datasource:
image:
tlodge/databox-datasource-mock
command:
/root/start.sh

databox-sdk:
image:
tlodge/databox-sdk
links:
- redis
- mongo
ports:
- "8086:8086"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOSTMOUNT}/sdk:/usr/src/app/conf
command:
node index.js

databox-test-server:
image:
tlodge/databox-test-server
links:
- redis
- mongo
ports:
- "9090:9090"
- "8435"
command:
node index.js
databox-test-server:
image:
tlodge/databox-test-server
links:
- redis
- mongo
ports:
- "9090:9090"
- "8435"
command:
node index.js
5 changes: 2 additions & 3 deletions startDatabox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if [ "$1" == "sdk" ]
then
export HOSTMOUNT=$(pwd -P)
docker stack deploy -c docker-databox-sdk.yaml sdk
docker-compose -f docker-databox-sdk.yaml up -d
exit 0
fi

Expand Down Expand Up @@ -92,15 +92,14 @@ fi

contNode node ./src/createCerts.js


if [ "$DEV" == "1" ]
then
#only build local images in dev mode
./getCompnentSrc.sh
docker-compose build
docker-compose -f ./docker-compose-dev-local-images.yaml build
fi
docker-compose up -f ./docker-databox-appstore.yaml -d
docker-compose -f ./docker-databox-appstore.yaml up -d
docker stack deploy -c docker-compose.yaml databox

DARGS="-e DATABOX_DEV=${DEV}"
Expand Down

0 comments on commit cacf89c

Please sign in to comment.