Merge pull request #10 from DeKaN/master
Add dockerized postgress for easier start
This commit is contained in:
commit
f2d7afad5a
5
.gitignore
vendored
5
.gitignore
vendored
@ -361,3 +361,8 @@ MigrationBackup/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# Dockerized database
|
||||
db/data/pgdata/
|
||||
db/pgadmin/*
|
||||
!db/pgadmin/pgpass
|
||||
|
@ -27,6 +27,7 @@ DiIiS is a fully-functional open-source local server for [Diablo III: Reaper of
|
||||
|
||||
## Installation
|
||||
|
||||
### General steps
|
||||
1. Install [PostgreSQL 9.5.25](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads).
|
||||
2. Create databases in PostgreSQL: `diiis` and `worlds`
|
||||
3. Change you account and password in `database.Account.config` and `database.Worlds.conifg`
|
||||
@ -42,6 +43,9 @@ DiIiS is a fully-functional open-source local server for [Diablo III: Reaper of
|
||||
11. Launch client (`x64` or `x86`) with arguments `"Diablo III64.exe" -launch -uid diablo3_engb`
|
||||
10. Login to the game using your credentials =)
|
||||
|
||||
### Using Docker
|
||||
Run `docker-compose up` inside `db` folder and continue from the 5th step in section above
|
||||
|
||||
## Playing with friends
|
||||
|
||||
1. Create new accounts using the console command:
|
||||
|
18
db/data/postgresql.conf
Normal file
18
db/data/postgresql.conf
Normal file
@ -0,0 +1,18 @@
|
||||
max_connections = 50
|
||||
|
||||
shared_buffers=1GB
|
||||
work_mem=16MB
|
||||
maintenance_work_mem=512MB
|
||||
temp_file_limit=10GB
|
||||
|
||||
random_page_cost=1.1
|
||||
effective_cache_size=4GB
|
||||
|
||||
log_min_duration_statement=200ms
|
||||
statement_timeout=60s
|
||||
lock_timeout=1s
|
||||
idle_in_transaction_session_timeout=10s
|
||||
|
||||
shared_preload_libraries=pg_stat_statements
|
||||
pg_stat_statements.max=10000
|
||||
pg_stat_statements.track=all
|
50
db/docker-compose.yml
Normal file
50
db/docker-compose.yml
Normal file
@ -0,0 +1,50 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
container_name: postgres_container
|
||||
image: postgres:14.5
|
||||
environment:
|
||||
POSTGRES_USER: "postgres"
|
||||
POSTGRES_PASSWORD: "postgres"
|
||||
PGDATA: "/var/lib/postgresql/data/pgdata"
|
||||
volumes:
|
||||
- ./data:/var/lib/postgresql/data
|
||||
- ./initdb:/docker-entrypoint-initdb.d
|
||||
ports:
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- postgres
|
||||
restart: unless-stopped
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "1"
|
||||
memory: 4G
|
||||
|
||||
pgadmin:
|
||||
container_name: pgadmin_container
|
||||
image: dpage/pgadmin4:6
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
|
||||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-password}
|
||||
PGADMIN_CONFIG_SERVER_MODE: "False"
|
||||
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
|
||||
volumes:
|
||||
- ./pgadmin:/var/lib/pgadmin
|
||||
- ./servers.json:/pgadmin4/servers.json
|
||||
|
||||
ports:
|
||||
- "5555:80"
|
||||
networks:
|
||||
- postgres
|
||||
restart: unless-stopped
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.5"
|
||||
memory: 1G
|
||||
|
||||
networks:
|
||||
postgres:
|
||||
driver: bridge
|
2397
db/initdb/dump.sql
Normal file
2397
db/initdb/dump.sql
Normal file
File diff suppressed because it is too large
Load Diff
1
db/pgadmin/pgpass
Normal file
1
db/pgadmin/pgpass
Normal file
@ -0,0 +1 @@
|
||||
postgres:5432:postgres:postgres:postgres
|
14
db/servers.json
Normal file
14
db/servers.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"Servers": {
|
||||
"1": {
|
||||
"Name": "postgres",
|
||||
"Group": "Servers",
|
||||
"Host": "postgres",
|
||||
"Port": 5432,
|
||||
"MaintenanceDB": "postgres",
|
||||
"Username": "postgres",
|
||||
"SSLMode": "prefer",
|
||||
"PassFile": "/var/lib/pgadmin/pgpass"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user