Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This method uses Docker to run the complete application stack.

1. Make sure that [Docker](https://www.docker.com) is installed on your machine.

2. Create a `.env` file by running `cp .env.template .env` in the root of your local project folder, and change GRAPH_PASSWORD to a unique value.
2. Create a `.env` file by running `cp .env.template .env` in the root of your local project folder, and change GRAPH_PASSWORD to a unique value. For windows users, you may need to use `Copy-Item` instead of `cp`. The full statement will be `Copy-Item -Path ".env.template" -Destination ".env"`

> **Note**
> When running locally, you may need to update one of the ports in the `.env` file if it conflicts with another application on your machine.
Expand Down Expand Up @@ -58,7 +58,7 @@ All code must pass the unit tests and style checks before it can be merged into


```
docker exec -it "police-data-trust_api_1" /bin/bash
docker exec -it "police-data-trust-api-1" /bin/bash

```

Expand Down
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
networks:
stack:
name: police-data-trust-net
driver: bridge

services:
db:
image: neo4j:5.23-community
Expand All @@ -13,6 +18,13 @@ services:
- "7687:7687" # Bolt port for database access
environment:
- NEO4J_AUTH=neo4j/${GRAPH_PASSWORD:-password}
healthcheck:
test: ["CMD-SHELL", "cypher-shell -u ${GRAPH_USER:-neo4j} -p ${GRAPH_PASSWORD:-password} 'RETURN 1' || exit 1"]
interval: 5s
timeout: 5s
retries: 30
networks:
- stack
test-neo4j:
image: neo4j:5.23-community
profiles:
Expand All @@ -24,6 +36,8 @@ services:
ports:
- "7475:7474"
- "7688:7687"
networks:
- stack
web:
build:
context: ./frontend
Expand All @@ -38,6 +52,8 @@ services:
NEXT_PUBLIC_API_BASE_URL: http://localhost:${NPDI_API_PORT:-5000}/api/v1
ports:
- ${NPDI_WEB_PORT:-3000}:${NPDI_WEB_PORT:-3000}
networks:
- stack
api:
build:
context: .
Expand All @@ -49,7 +65,8 @@ services:
env_file:
- ".env"
depends_on:
- db
db:
condition: service_healthy
environment:
PYTHONPATH: app/
FLASK_ENV: ${FLASK_ENV:-development}
Expand All @@ -60,6 +77,8 @@ services:
WAIT_HOSTS: db:7687
ports:
- ${NPDI_API_PORT:-5001}:${NPDI_API_PORT:-5001}
networks:
- stack
volumes:
neo4j: {}
neo4j_logs: {}
Expand Down
4 changes: 4 additions & 0 deletions frontend/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ const nextConfig: NextConfig = {
output: "export"
}

module.exports = {
allowedDevOrigins: ["http://localhost:3000", "http://127.0.0.1:3000", "127.0.0.1"]
}

export default nextConfig
Loading