docker laten werken hiermee is zo moeilijk

This commit is contained in:
2020-02-24 09:56:47 +01:00
parent 93df0d9f48
commit d901955539
5 changed files with 8 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ spec:
- name: front-end - name: front-end
image: beppev/server-b:latest image: beppev/server-b:latest
ports: ports:
- containerPort: 5000 - containerPort: 6000
--- ---
kind: Service kind: Service
apiVersion: v1 apiVersion: v1
@@ -36,7 +36,7 @@ spec:
ports: ports:
- name: http - name: http
protocol: TCP protocol: TCP
port: 5000 port: 6000
--- ---
kind: Service kind: Service
apiVersion: v1 apiVersion: v1

View File

@@ -3,7 +3,7 @@ import requests
app = Flask(__name__) app = Flask(__name__)
URL = "http://service:5000" URL = "http://service:6000"
@app.route('/') @app.route('/')
@@ -12,4 +12,4 @@ def doRequest():
if __name__ == '__main__': if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0") app.run(debug=True, host="0.0.0.0", port=5000)

View File

@@ -7,4 +7,4 @@ run pip install -r requirements.txt
expose 5000 expose 5000
entrypoint [ "python" ] entrypoint [ "python" ]
cmd [ "__init__.py" ] cmd [ "app.py" ]

View File

@@ -13,4 +13,4 @@ def doRequest():
if __name__ == '__main__': if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0") app.run(debug=True, host="0.0.0.0", port=6000)

View File

@@ -4,7 +4,7 @@ copy . /app
workdir /app workdir /app
run pip install -r requirements.txt run pip install -r requirements.txt
expose 5000 expose 6000
entrypoint [ "python" ] entrypoint [ "python" ]
cmd [ "__init__.py" ] cmd [ "app.py" ]