From 309c88e8bbc8cbce84f4b16c42de858cf554b965 Mon Sep 17 00:00:00 2001 From: NatureFreshMilk Date: Fri, 15 Feb 2019 07:13:15 +0100 Subject: [PATCH] psql setup --- server/postgres_test/.gitignore | 1 + server/postgres_test/docker-compose.yml | 4 +--- server/postgres_test/import.sh | 2 ++ server/postgres_test/world.postgres.mt | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 server/postgres_test/.gitignore create mode 100755 server/postgres_test/import.sh diff --git a/server/postgres_test/.gitignore b/server/postgres_test/.gitignore new file mode 100644 index 0000000..1269488 --- /dev/null +++ b/server/postgres_test/.gitignore @@ -0,0 +1 @@ +data diff --git a/server/postgres_test/docker-compose.yml b/server/postgres_test/docker-compose.yml index d1e21e4..47dce6b 100644 --- a/server/postgres_test/docker-compose.yml +++ b/server/postgres_test/docker-compose.yml @@ -9,6 +9,4 @@ services: ports: - "5432:5432" volumes: - - "./data/postgres:/var/lib/postgresql/data" - - "./data/backup:/backup" - - "./data/restore:/restore" + - "./data:/var/lib/postgresql/data" diff --git a/server/postgres_test/import.sh b/server/postgres_test/import.sh new file mode 100755 index 0000000..40ccd59 --- /dev/null +++ b/server/postgres_test/import.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cat minetest.postgres.sql | sudo docker exec -i postgres_test_postgres_1 psql -U postgres diff --git a/server/postgres_test/world.postgres.mt b/server/postgres_test/world.postgres.mt index 0114109..3f0e8cd 100644 --- a/server/postgres_test/world.postgres.mt +++ b/server/postgres_test/world.postgres.mt @@ -3,6 +3,6 @@ backend = postgresql creative_mode = true enable_damage = true player_backend = postgresql -pgsql_connection = host=localhost port=5432 user=postgres password=enter dbname=minetest -pgsql_player_connection = host=localhost port=5432 user=postgres password=enter dbname=minetest +pgsql_connection = host=localhost port=5432 user=postgres password=enter dbname=postgres +pgsql_player_connection = host=localhost port=5432 user=postgres password=enter dbname=postgres