Skip to content

Commit

Permalink
Fix port assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
DMalone87 committed Jan 8, 2025
1 parent 6d79ec3 commit 2361d60
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: {}
Expand Down
2 changes: 1 addition & 1 deletion run_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
flask run --host=0.0.0.0 --port=${NPDI_API_PORT:-5001}

0 comments on commit 2361d60

Please sign in to comment.