diff --git a/deploy.yaml b/deploy.yaml index 7c990ca..2e0e23e 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -24,7 +24,7 @@ spec: - name: front-end image: beppev/server-b:latest ports: - - containerPort: 5000 + - containerPort: 6000 --- kind: Service apiVersion: v1 @@ -36,7 +36,7 @@ spec: ports: - name: http protocol: TCP - port: 5000 + port: 6000 --- kind: Service apiVersion: v1 diff --git a/serverA/__init__.py b/serverA/app.py similarity index 67% rename from serverA/__init__.py rename to serverA/app.py index ab9997a..ad4aa44 100644 --- a/serverA/__init__.py +++ b/serverA/app.py @@ -3,7 +3,7 @@ import requests app = Flask(__name__) -URL = "http://service:5000" +URL = "http://service:6000" @app.route('/') @@ -12,4 +12,4 @@ def doRequest(): if __name__ == '__main__': - app.run(debug=True, host="0.0.0.0") + app.run(debug=True, host="0.0.0.0", port=5000) diff --git a/serverA/dockerfile b/serverA/dockerfile index 10c5891..5709ecc 100644 --- a/serverA/dockerfile +++ b/serverA/dockerfile @@ -7,4 +7,4 @@ run pip install -r requirements.txt expose 5000 entrypoint [ "python" ] -cmd [ "__init__.py" ] \ No newline at end of file +cmd [ "app.py" ] \ No newline at end of file diff --git a/serverB/__init__.py b/serverB/app.py similarity index 82% rename from serverB/__init__.py rename to serverB/app.py index 516a395..d2ae5b2 100644 --- a/serverB/__init__.py +++ b/serverB/app.py @@ -13,4 +13,4 @@ def doRequest(): if __name__ == '__main__': - app.run(debug=True, host="0.0.0.0") + app.run(debug=True, host="0.0.0.0", port=6000) diff --git a/serverB/dockerfile b/serverB/dockerfile index 10c5891..b9692c2 100644 --- a/serverB/dockerfile +++ b/serverB/dockerfile @@ -4,7 +4,7 @@ copy . /app workdir /app run pip install -r requirements.txt -expose 5000 +expose 6000 entrypoint [ "python" ] -cmd [ "__init__.py" ] \ No newline at end of file +cmd [ "app.py" ] \ No newline at end of file