Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions quote_disp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.8-slim-buster
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]
2 changes: 1 addition & 1 deletion quote_disp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def home():

@app.route("/get_quote")
def quote():
quote = requests.get("http://gen:5000/quote").text
quote = requests.get("http://quote-gen-container:5000/quote").text
print("quote - ", quote)

return render_template("quote.html", quote=quote)
Expand Down
16 changes: 16 additions & 0 deletions quote_disp/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.7"

services:
web1:
build: ./quote_gen
container_name: quote-gen-container
ports:
- "5000:5000"

web2:
build: ./quote_disp
container_name: code-disp-container
ports:
- "5001:5001"
depends_on:
- web1
6 changes: 6 additions & 0 deletions quote_gen/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.8-slim-buster
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT [ "python" ]
CMD [ "app.py" ]