Skip to content

Commit

Permalink
Merge pull request #2 from lowescott/bugfix
Browse files Browse the repository at this point in the history
Fix minor bugs
  • Loading branch information
scottslowe authored Nov 18, 2017
2 parents e2ed74d + 0fc7051 commit a22361d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
8 changes: 4 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ def show_info_json(svc_url):
def show_info_html():
# Get information from "users" web service
user_ws_response = get_svc_info(
host = str(os.getenv('USER_API_HOST', 'localhost')),
port = str(os.getenv('USER_API_PORT', '5000')),
host = str(os.getenv('USER_API_HOST', 'user-api')),
port = str(os.getenv('USER_API_PORT', '6000')),
service = 'users')

# Get information from "orders" web service
order_ws_response = get_svc_info(
host = str(os.getenv('ORDER_API_HOST', 'localhost')),
port = str(os.getenv('ORDER_API_PORT', '5000')),
host = str(os.getenv('ORDER_API_HOST', 'order-api')),
port = str(os.getenv('ORDER_API_PORT', '7000')),
service = 'orders')

# Gather information for front-end service
Expand Down
8 changes: 5 additions & 3 deletions app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<hr/>

<h2>Information for "Users" Web Service:</h2>
<h2>Connection Information for "User" Web Service:</h2>

<p>Container hostname: {{ users['container_hostname'] }}</p>
<p>Container private IP address: {{ users['container_ip'] }}</p>
Expand All @@ -19,7 +19,7 @@ <h2>Information for "Users" Web Service:</h2>

<hr/>

<h2>Information for "Orders" Web Service:</h2>
<h2>Connection Information for "Order" Web Service:</h2>

<p>Container hostname: {{ orders['container_hostname'] }}</p>
<p>Container private IP address: {{ orders['container_ip'] }}</p>
Expand All @@ -29,7 +29,9 @@ <h2>Information for "Orders" Web Service:</h2>
<p>URL root of request: {{ orders['urlroot'] }}</p>
<p>Time of request: {{ orders['time'] }}</p>

<h2>Information for "Front-End" Web Service:</h2>
<hr/>

<h2>Connection Information for HTML Front End:</h2>

<p>Container hostname: {{ frontend['container_hostname'] }}</p>
<p>Container private IP address: {{ frontend['container_ip'] }}</p>
Expand Down
11 changes: 3 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
version: "2"
services:
web-ui:
image: slowe/flask-web-svc:0.4
image: bugfix:0.1
ports:
- "5000:5000"
environment:
- USER_API_HOST=user-api
- USER_API_PORT=6000
- ORDER_API_HOST=order-api
- ORDER_API_PORT=7000
user-api:
image: slowe/flask-web-svc:0.4
image: bugfix:0.1
ports:
- "6000:6000"
environment:
- PORT=6000
order-api:
image: slowe/flask-web-svc:0.4
image: bugfix:0.1
ports:
- "7000:7000"
environment:
Expand Down

0 comments on commit a22361d

Please sign in to comment.