Currently, the forum container uses a PostgreSQL server.
We could use it for other applications too, for example Sentry, and so run it in a separate container.
Container name: Nuern
Currently, the forum container uses a PostgreSQL server.
We could use it for other applications too, for example Sentry, and so run it in a separate container.
Container name: Nuern
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Sandlayth | T678 Deploy nasqueron/notifications docker image on Dwellers | |||
Resolved | dereckson | T684 Install an error reporting server | |||
Wontfix | dereckson | T686 Decouple PostgreSQL from forum container on Dwellers |
Container launched.
Script to run the container
#!/bin/sh # ------------------------------------------------------------- # PostgreSQL Nuern instance # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Author: Sébastien Santoro aka Dereckson # Project: Nasqueron # Created: 2016-03-01 # Description: Provide PostgreSQL database for Dwellers apps # Image: postgres # Services used: Docker volume (/data/nuern/data) # ------------------------------------------------------------- # ------------------------------------------------------------- # Container parameters # # Get credentials from zr # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSTANCE_NAME=nuern PGSQL_SUPERUSER_PASSWORD=`ssh -i /root/.ssh/id_zr zr@212.83.187.132 cat data/nuern.dat` # ------------------------------------------------------------- # Local data directory # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PGSQL_DATADIR=/data/$INSTANCE_NAME/data mkdir -p $PGSQL_DATADIR chcon -Rt svirt_sandbox_file_t $PGSQL_DATADIR # ------------------------------------------------------------- # Run container # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - docker run -dt \ -e POSTGRES_PASSWORD=$PGSQL_SUPERUSER_PASSWORD \ -v $PGSQL_DATADIR:/var/lib/postgresql/data \ --name $INSTANCE_NAME postgres
Still to do
Import database from the forum.
PostgreSQL by default doesn't consume 2 GB of RAM for an InnoDB cache, so I'm not sure it's a good idea.
Any new deployment of Discourse, we'll take a decision where to host it.
We've a PostgreSQL cluster starting with db-A-001 available for example to decouple database from Docker, but that will be consolidated.
Services like Sentry are welcome to host all their stack including the db in containers.
Nasqueron in-house services will use an optimised cluster.