diff --git a/Dockerfile b/Dockerfile index 04a7411..0169720 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ ARG python_version=3.9.18 FROM python:${python_version}-slim-bullseye AS build -WORKDIR /src - COPY requirements.txt /tmp/requirements.txt RUN apt-get update && \ diff --git a/src/controller.py b/src/controller.py index aa35422..c541134 100644 --- a/src/controller.py +++ b/src/controller.py @@ -6,7 +6,7 @@ from apple import verify_attestation_statement from goog import verify_integrity_token -app = Flask(__name__) +server = Flask(__name__) nonce = secrets.token_hex(16) @@ -97,7 +97,7 @@ def decode_base64_to_json(s): return json_obj -@app.route('/topic/basicmessages/', methods=['POST']) +@server.route('/topic/basicmessages/', methods=['POST']) def basicmessages(): print("Run POST /topic/basicmessages/") message = request.get_json() @@ -110,7 +110,7 @@ def basicmessages(): return make_response('', 204) -@app.route('/topic/connections/', methods=['POST']) +@server.route('/topic/connections/', methods=['POST']) def connections(): print("Run POST /topic/connections/") @@ -122,6 +122,5 @@ def connections(): return make_response('', 204) - if __name__ == '__main__': - app.run(debug=True) + server.run(debug=True)