Sign inSign up

egarchive/lega-db

By egarchive

•Updated over 5 years ago

LocalEGA internal database

Image
0

3.4K

egarchive/lega-db repository overview

⁠LocalEGA database definitions and docker image

We use Postgres 12.1⁠ and Alpine 3.10.

Security is hardened:

  • We do not use 'trust' even for local connections
  • Requiring password authentication for all
  • Using scram-sha-256 is stronger than md5
  • Enforcing TLS communication
  • Enforcing client-certificate verification

⁠Configuration

There are 2 users (lega_in and lega_out), and 2 schemas (local_ega and local_ega_download).

The following environment variables can be used to configure the database:

VariableDescriptionDefault value
PGDATAThe data directory/ega/data
DB_LEGA_IN_PASSWORDlega_in's password-
TZTimezone for the Postgres serverEurope/Madrid

As usual⁠, include your own .sh, .sql or .sql.gz files in /docker-entrypoint-initdb.d/ in order to have them included at initialization time.

⁠TLS support

VariableDescriptionDefault value
PG_SERVER_CERTPublic Certificate in PEM format/etc/ega/pg.cert
PG_SERVER_KEYPrivate Key in PEM format/etc/ega/pg.key
PG_CAPublic CA Certificate in PEM format/etc/ega/CA.cert
PG_VERIFY_PEEREnforce client verification0
SSL_SUBJSubject for the self-signed certificate creation/C=ES/ST=Spain/L=Barcelona/O=CRG/OU=SysDevs/CN=LocalEGA/[email protected]

If not already injected, the files located at PG_SERVER_CERT and PG_SERVER_KEY will be generated, as a self-signed public/private certificate pair, using SSL_SUBJ.

Client verification is enforced if and only if PG_CA exists and PG_VERIFY_PEER is set to 1.

Tag summary

Content type

Image

Digest

Size

57.8 MB

Last updated

over 5 years ago

docker pull egarchive/lega-db