From 071738ee4eacfb0099f747cf16840e62f1db9b6e Mon Sep 17 00:00:00 2001 From: ahmed531998 Date: Wed, 5 Apr 2023 22:33:54 +0200 Subject: [PATCH] modify_host --- Dockerfile | 2 -- main.py | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ee3c682..0c40ae6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,4 @@ COPY . . RUN pip install -r requirements.txt -EXPOSE 4000 - ENTRYPOINT ["python", "main.py"] diff --git a/main.py b/main.py index 5991656..e49ba54 100644 --- a/main.py +++ b/main.py @@ -28,7 +28,6 @@ cors = CORS(app, resources={r"/predict": {"origins": url}, r"/feedback": {"origi conn = psycopg2.connect( host="janet-pg", - port=5432, database=os.getenv("POSTGRES_DB"), user=os.getenv("POSTGRES_USER"), password=os.getenv("POSTGRES_PASSWORD")) @@ -168,4 +167,4 @@ if __name__ == "__main__": 'response_intent text NOT NULL);' ) conn.commit() - app.run(host='127.0.0.1', port=4000) + app.run(host='0.0.0.0')