Giter Club home page Giter Club logo

postgres10's Introduction

SORMAS - Surveillance, Outbreak Response Management and Analysis System

Container Postgres

The postgres container is build from image postgres:10-alpine. It uses a prepared /etc/postgresql/postgresql.conf file with parameter:

max_prepared_transactions = 110         # zero disables the feature

This is needed to successfully deploy sormas.

During initial setup /docker-entrypoint-initdb.d/setup_sormas.sh is executed. Here the sormas user and databases will get created and configured.

CREATE USER ${SORMAS_POSTGRES_USER} WITH PASSWORD '${SORMAS_POSTGRES_PASSWORD}' CREATEDB;
CREATE DATABASE ${DB_NAME} WITH OWNER = '${SORMAS_POSTGRES_USER}' ENCODING = 'UTF8';
CREATE DATABASE ${DB_NAME_AUDIT} WITH OWNER = '${SORMAS_POSTGRES_USER}' ENCODING = 'UTF8';
\c ${DB_NAME}
CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO ${SORMAS_POSTGRES_USER};
CREATE EXTENSION temporal_tables;
CREATE EXTENSION pg_trgm;
CREATE EXTENSION pgcrypto;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO ${SORMAS_POSTGRES_USER};
\c ${DB_NAME_AUDIT}
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO ${SORMAS_POSTGRES_USER};
ALTER TABLE IF EXISTS schema_version OWNER TO ${SORMAS_POSTGRES_USER};

Environment variables

These configurations of postgres can be passed to container via environment variables. For more information about them, please refer to postgres documentation.

  • SUPERUSER_RESERVED_CONNECTIONS
  • EFFECTIVE_IO_CONCURRENCY
  • RANDOM_PAGE_COST
  • BGWRITER_DELAY
  • BGWRITER_LRU_MAXPAGES
  • BGWRITER_LRU_MULTIPLIER
  • BGWRITER_FLUSH_AFTER
  • IDLE_IN_TRANSACTION_SESSION_TIMEOUT

postgres10's People

Contributors

quantumsolver avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.