From 2361d6035600cbc8071b4935f3f8e92496fb0ec0 Mon Sep 17 00:00:00 2001 From: Darrell Malone Jr Date: Tue, 7 Jan 2025 19:52:20 -0600 Subject: [PATCH] Fix port assignment --- .env.template | 2 +- backend/Dockerfile | 3 ++- docker-compose.yml | 4 ++-- run_dev.sh | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.env.template b/.env.template index 10a1ac6c..63a2b513 100644 --- a/.env.template +++ b/.env.template @@ -4,7 +4,7 @@ GRAPH_DB=police_data GRAPH_URI=db GRAPH_NM_URI=db:7687 GRAPH_PORT=5432 -NPDI_API_PORT=5000 +NPDI_API_PORT=5001 MIXPANEL_TOKEN=your_mixpanel_token MAIL_SERVER=mail.yourdomain.com MAIL_PORT=465 diff --git a/backend/Dockerfile b/backend/Dockerfile index 9f54d46e..76743f03 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -29,7 +29,8 @@ RUN pip3 install -r requirements/dev_unix.txt COPY . . -ENV NPDI_API_PORT=5000 +ARG NPDI_API_PORT=5001 +ENV NPDI_API_PORT=$NPDI_API_PORT EXPOSE $NPDI_API_PORT CMD /wait && ./run_dev.sh diff --git a/docker-compose.yml b/docker-compose.yml index 6824fe7a..9b1897fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,7 +43,7 @@ services: context: . dockerfile: ./backend/Dockerfile args: - NPDI_API_PORT: ${NPDI_API_PORT:-5000} + NPDI_API_PORT: ${NPDI_API_PORT:-5001} volumes: - .:/app depends_on: @@ -57,7 +57,7 @@ services: MIXPANEL_TOKEN: ${MIXPANEL_TOKEN:-notset} WAIT_HOSTS: db:7687 ports: - - ${NPDI_API_PORT:-5000}:${NPDI_API_PORT:-5000} + - ${NPDI_API_PORT:-5001}:${NPDI_API_PORT:-5001} volumes: neo4j: {} neo4j_logs: {} diff --git a/run_dev.sh b/run_dev.sh index bb2ec609..5d7383ff 100755 --- a/run_dev.sh +++ b/run_dev.sh @@ -6,4 +6,4 @@ export PYTHONPATH=. #flask psql create #flask psql init flask db seed -flask run --host=0.0.0.0 --port=${PORT:-5000} \ No newline at end of file +flask run --host=0.0.0.0 --port=${NPDI_API_PORT:-5001} \ No newline at end of file