Готовая конфигурация для postgres
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
pgdata/
|
||||
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: '3.8'
|
||||
|
||||
networks:
|
||||
postgres-network:
|
||||
name: postgres-network
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17
|
||||
networks:
|
||||
- postgres-network
|
||||
container_name: shared-postgres
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./pgdata:/var/lib/postgresql/data
|
||||
- ./init:/docker-entrypoint-initdb.d:ro
|
||||
restart: unless-stopped
|
||||
12747
init/discord_economy_bot_backup.sql
Normal file
12747
init/discord_economy_bot_backup.sql
Normal file
File diff suppressed because one or more lines are too long
1285
init/discord_moderation_bot_backup.sql
Normal file
1285
init/discord_moderation_bot_backup.sql
Normal file
File diff suppressed because it is too large
Load Diff
39
init/init.sql
Normal file
39
init/init.sql
Normal file
@@ -0,0 +1,39 @@
|
||||
ALTER USER postgres WITH PASSWORD 'postgres';
|
||||
|
||||
CREATE ROLE discord_economy_bot WITH
|
||||
LOGIN
|
||||
NOSUPERUSER
|
||||
NOCREATEDB
|
||||
NOCREATEROLE
|
||||
INHERIT
|
||||
REPLICATION
|
||||
NOBYPASSRLS
|
||||
CONNECTION LIMIT -1
|
||||
PASSWORD 'economy_bot';
|
||||
|
||||
CREATE DATABASE discord_economy_bot_db
|
||||
WITH
|
||||
OWNER = discord_economy_bot
|
||||
ENCODING = 'UTF8'
|
||||
LOCALE_PROVIDER = 'libc'
|
||||
CONNECTION LIMIT = -1
|
||||
IS_TEMPLATE = False;
|
||||
|
||||
CREATE ROLE discord_moderation_bot WITH
|
||||
LOGIN
|
||||
NOSUPERUSER
|
||||
NOCREATEDB
|
||||
NOCREATEROLE
|
||||
INHERIT
|
||||
REPLICATION
|
||||
NOBYPASSRLS
|
||||
CONNECTION LIMIT -1
|
||||
PASSWORD 'moderation_bot';
|
||||
|
||||
CREATE DATABASE discord_moderation_bot_db
|
||||
WITH
|
||||
OWNER = discord_moderation_bot
|
||||
ENCODING = 'UTF8'
|
||||
LOCALE_PROVIDER = 'libc'
|
||||
CONNECTION LIMIT = -1
|
||||
IS_TEMPLATE = False;
|
||||
Reference in New Issue
Block a user