diff --git a/.gitignore b/.gitignore index 0f6b086..088582c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ data sqlite-latest.sqlite *.log *.dmp +postgres_data diff --git a/README.md b/README.md index 0459135..61c0136 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,21 @@ The idea is to find "an algos that died in faction warfare having at least 2 rem ## Data -One half of the data is the eve static dump coming from [fuzzworks](https://www.fuzzwork.co.uk/dump/)
-And the other half are the dumps from [everef](https://data.everef.net/killmails/) +One half of the data is the eve static dump coming from [fuzzworks](https://www.fuzzwork.co.uk/dump/) specifically the [postgres dump](https://www.fuzzwork.co.uk/dump/postgres-schema-latest.dmp.bz2)
+The other half are the dumps from [everef](https://data.everef.net/killmails/) -Static dump is to be extracted into the project root
-And the killmails are to be put into data in their .tar.bz2 format \ No newline at end of file +Killmails are to be put into data in their .tar.bz2 format + +## Database Import + +The PostgreSQL database dump comes in the form of a `.dmp` file. The database must be empty prior to import. + +To import the database dump: + +1. Ensure PostgreSQL is running (e.g., via `docker-compose up -d`) +2. Ensure the target database exists and is empty +3. Import the dump using `pg_restore` from the host machine: + +```bash +docker-compose exec -T db pg_restore -U postgres -d zkill -v < postgres-schema-latest.dmp +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a2c8a04 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +services: + db: + image: postgres:17 + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=postgres + ports: + - "5432:5432" + volumes: + - ./postgres_data:/var/lib/postgresql/data