From cfa07daf0bf571a2869306e4a016a700133ec86c Mon Sep 17 00:00:00 2001 From: Fabian Haas <29468630+hfxbse@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:03:06 +0100 Subject: [PATCH] Change nginx port Fix conflicts when deploying to Google Cloud Run --- README.md | 2 +- docker-compose.yml | 3 ++- nginx/default.conf | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f79d7ce..2b51375 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The service can be started through [Docker Compose](https://docs.docker.com/comp docker-compose up ``` -After this, the [user application](http://localhost:8080), [Airflow](http://localhost:8080/airflow/), +After this, the [user application](http://localhost:5000), [Airflow](http://localhost:5000/airflow/), [Hadoop task overview](http://localhost:8088), and the [Hadoop file viewer](http://localhost:9870/explorer.html) should be reachable. diff --git a/docker-compose.yml b/docker-compose.yml index 89f961a..64064c5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,13 +3,14 @@ services: build: context: ./nginx ports: - - "8080:8080" + - "5000:5000" depends_on: - frontend - airflow environment: - AIRFLOW=airflow - FRONTEND=frontend + - INCLUDE_PORT=on frontend: build: diff --git a/nginx/default.conf b/nginx/default.conf index d3f40bd..6274246 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,5 +1,7 @@ server { - listen 8080; + listen 5000; + + port_in_redirect ${INCLUDE_PORT}; location / { proxy_pass "http://${FRONTEND}:3000/"; @@ -13,6 +15,6 @@ server { proxy_redirect off; auth_basic "Airflow Admin UI"; - auth_basic_user_file /tmp/credentials/airflow; + auth_basic_user_file /credentials/airflow; } }