Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Fix docker compose file (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
dluc committed Sep 20, 2017
1 parent 0d11cea commit dd3ff72
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Set bash scripts to always be in LF
* text=auto eol=lf
*.sh text eol=lf
scripts/build text eol=lf
scripts/docker/run text eol=lf
scripts/git/setup text eol=lf
53 changes: 40 additions & 13 deletions scripts/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,62 @@
# - note how the file references many environment variables, either set
# them in your system or edit this file adding the values here
# - run `docker-compose up`
# - open the browser at http://127.0.0.1:10080
# - open the browser at http://127.0.0.1:10443
#
# For more information see
# https://github.com/Azure/azure-iot-pcs-remote-monitoring-java

# TODO: remove port 80 in the reverse proxy and use 443
# TODO: AAD settings

version: "3"

services:
reverseproxy:
image: azureiotpcs/remote-monitoring-nginx:latest
ports:
- "10080:80"
- "10443:443"
depends_on:
- webui
- auth
- iothubmanager
- devicesimulation
- telemetry
- config
volumes:
- /app/certs:/app/certs:ro

webui:
image: azureiotpcs/remote-monitoring-webui:latest
image: azureiotpcs/pcs-remote-monitoring-webui:latest
ports:
- "9080:80"
- "9443:443"
- "443:443"
depends_on:
- auth
- iothubmanager
- devicesimulation
- telemetry
- config
volumes:
- /app/webui-config.js:/app/build/config.js:ro

auth:
# TODO Use Java container
image: azureiotpcs/pcs-auth-dotnet
ports:
- "9001:9001"
environment:
- PCS_AUTH_AAD_GLOBAL_TENANTID=ToDo
- PCS_AUTH_ISSUER
- PCS_AUTH_AUDIENCE
- PCS_APPLICATION_SECRET

iothubmanager:
image: azureiotpcs/iothub-manager-java
ports:
- "9002:9002"
environment:
- PCS_IOTHUB_CONNSTRING
- PCS_AUTH_ISSUER
- PCS_AUTH_AUDIENCE
- PCS_APPLICATION_SECRET
# TODO: the dependency on config is temporary
- PCS_CONFIG_WEBSERVICE_URL=http://config:9005/v1

devicesimulation:
image: azureiotpcs/device-simulation-dotnet:latest
Expand All @@ -62,7 +69,11 @@ services:
- "9003:9003"
environment:
- PCS_IOTHUB_CONNSTRING
- PCS_AUTH_ISSUER
- PCS_AUTH_AUDIENCE
- PCS_APPLICATION_SECRET
- PCS_STORAGEADAPTER_WEBSERVICE_URL=http://storageadapter:9022/v1
# This could be used to mount custom device models into the simulation
#volumes:
# - ./sample-volume:/app/data:ro

Expand All @@ -74,6 +85,9 @@ services:
- "9004:9004"
environment:
- PCS_TELEMETRY_DOCUMENTDB_CONNSTRING
- PCS_AUTH_ISSUER
- PCS_AUTH_AUDIENCE
- PCS_APPLICATION_SECRET
- PCS_STORAGEADAPTER_WEBSERVICE_URL=http://storageadapter:9022/v1

config:
Expand All @@ -83,15 +97,24 @@ services:
ports:
- "9005:9005"
environment:
- PCS_CONFIG_WEBSERVICE_PORT=9005
- PCS_BINGMAP_KEY
- PCS_AUTH_ISSUER
- PCS_AUTH_AUDIENCE
- PCS_APPLICATION_SECRET
- PCS_STORAGEADAPTER_WEBSERVICE_URL=http://storageadapter:9022/v1
- PCS_DEVICESIMULATION_WEBSERVICE_URL=http://devicesimulation:9003/v1
- PCS_TELEMETRY_WEBSERVICE_URL=http://telemetry:9004/v1
- PCS_IOTHUBMANAGER_WEBSERVICE_URL=http://iothubmanager:9002/v1

storageadapter:
image: azureiotpcs/pcs-storage-adapter-java:latest
ports:
- "9022:9022"
environment:
- PCS_STORAGEADAPTER_DOCUMENTDB_CONNSTRING
- PCS_AUTH_ISSUER
- PCS_AUTH_AUDIENCE
- PCS_APPLICATION_SECRET

telemetryagent:
image: azureiotpcs/telemetry-agent-java:latest
Expand All @@ -102,14 +125,18 @@ services:
- "9023:9023"
environment:
- PCS_TELEMETRYAGENT_DOCUMENTDB_CONNSTRING
- PCS_TELEMETRY_WEBSERVICE_URL=http://telemetry:9004/v1
- PCS_CONFIG_WEBSERVICE_URL=http://config:9005/v1
- PCS_IOTHUBMANAGER_WEBSERVICE_URL=http://iothubmanager:9002/v1
# For more info about IoT Hub react settings see
# https://github.com/Azure/toketi-iothubreact#iothub-configuration
- PCS_IOTHUBREACT_AZUREBLOB_ACCOUNT
- PCS_IOTHUBREACT_AZUREBLOB_KEY
- PCS_IOTHUBREACT_AZUREBLOB_ENDPOINT_SUFFIX
- PCS_IOTHUBREACT_HUB_NAME
- PCS_IOTHUBREACT_HUB_ENDPOINT
- PCS_IOTHUBREACT_HUB_PARTITIONS
- PCS_IOTHUBREACT_ACCESS_CONNSTRING
- PCS_AUTH_ISSUER
- PCS_AUTH_AUDIENCE
- PCS_APPLICATION_SECRET
- PCS_TELEMETRY_WEBSERVICE_URL=http://telemetry:9004/v1
- PCS_CONFIG_WEBSERVICE_URL=http://config:9005/v1
- PCS_IOTHUBMANAGER_WEBSERVICE_URL=http://iothubmanager:9002/v1
11 changes: 11 additions & 0 deletions scripts/docker/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
echo "Starting at https://localhost:10443"
echo
echo "Note:"
echo " * When running locally, the service might run with an invalid SSL cert"
echo " * The service requires some configuration files hosted under /app"
echo " Edit docker-compose.yml to use a different path"
echo

read -t 10 -p "Press ENTER to start or wait ten seconds for the services to start..."

docker-compose up

0 comments on commit dd3ff72

Please sign in to comment.