aboutsummaryrefslogtreecommitdiff
path: root/docker/postgres
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2020-09-12 10:03:48 +0200
committerQuentin <quentin@deuxfleurs.fr>2020-09-12 10:03:48 +0200
commitc4a6cf1534b864d3941c839d4a4dca7e505bd828 (patch)
tree3e866768cf39ae947def5b205f74fddfb435725d /docker/postgres
parent0550647b9348d1e36431400e0832b4340564c658 (diff)
downloadinfrastructure-c4a6cf1534b864d3941c839d4a4dca7e505bd828.tar.gz
infrastructure-c4a6cf1534b864d3941c839d4a4dca7e505bd828.zip
Rebase first step
Diffstat (limited to 'docker/postgres')
-rw-r--r--docker/postgres/Dockerfile19
-rw-r--r--docker/postgres/README.md4
-rw-r--r--docker/postgres/postgresql.conf25
-rwxr-xr-xdocker/postgres/start.sh22
4 files changed, 0 insertions, 70 deletions
diff --git a/docker/postgres/Dockerfile b/docker/postgres/Dockerfile
deleted file mode 100644
index bb018b8..0000000
--- a/docker/postgres/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-FROM amd64/debian:stretch
-
-RUN echo "deb http://deb.debian.org/debian stretch-backports main contrib non-free # available after stretch release" > /etc/apt/sources.list.d/stretch-backports.list && \
- apt-get update && \
- apt-get -qq -y full-upgrade && \
- apt-get install -y postgresql-all golang-1.11 git && \
- export GOPATH=/usr/local/go && \
- mkdir -p /usr/local/go/src/github.com/sorintlab && \
- cd /usr/local/go/src/github.com/sorintlab && \
- git clone --depth=1 https://github.com/sorintlab/stolon && \
- ln -s /usr/lib/go-1.11/bin/go /usr/bin/go && \
- ln -s /usr/lib/go-1.11/bin/gofmt /usr/bin/gofmt && \
- cd ./stolon && \
- ./build && \
- mv /usr/local/go/src/github.com/sorintlab/stolon/bin/* /usr/local/bin/ && \
- rm -rf /usr/local/go
-
-USER postgres
-
diff --git a/docker/postgres/README.md b/docker/postgres/README.md
deleted file mode 100644
index d2f7a12..0000000
--- a/docker/postgres/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-```
-docker build -t superboum/arm32v7_postgres .
-docker build -t superboum/amd64_postgres:v2 .
-```
diff --git a/docker/postgres/postgresql.conf b/docker/postgres/postgresql.conf
deleted file mode 100644
index 8e0af2b..0000000
--- a/docker/postgres/postgresql.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-data_directory = '/var/lib/postgresql/9.6/main' # use data in another directory
-hba_file = '/etc/postgresql/9.6/main/pg_hba.conf' # host-based authentication file
-ident_file = '/etc/postgresql/9.6/main/pg_ident.conf' # ident configuration file
-external_pid_file = '/var/run/postgresql/9.6-main.pid' # write an extra PID file
-listen_addresses = '*' #listen on every ip / interfaces
-port = 5432 # (change requires restart)
-max_connections = 100 # (change requires restart)
-unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
-ssl = true # (change requires restart)
-ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' # (change requires restart)
-ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires restart)
-shared_buffers = 128MB # min 128kB
-dynamic_shared_memory_type = posix # the default is the first option
-log_line_prefix = '%m [%p] %q%u@%d ' # special values:
-log_timezone = 'UTC'
-cluster_name = '9.6/main' # added to process titles if nonempty
-stats_temp_directory = '/var/run/postgresql/9.6-main.pg_stat_tmp'
-datestyle = 'iso, mdy'
-timezone = 'UTC'
-lc_messages = 'C.UTF-8' # locale for system error message
-lc_monetary = 'C.UTF-8' # locale for monetary formatting
-lc_numeric = 'C.UTF-8' # locale for number formatting
-lc_time = 'C.UTF-8' # locale for time formatting
-default_text_search_config = 'pg_catalog.english'
-
diff --git a/docker/postgres/start.sh b/docker/postgres/start.sh
deleted file mode 100755
index f1d493f..0000000
--- a/docker/postgres/start.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-if [ -f /local/pg_hba.conf ]; then
- echo "Copying Nomad configuration..."
- cp /local/pg_hba.conf /etc/postgresql/9.6/main/
- echo "Done"
-fi
-
-
-if [ -z "$(ls -A /var/lib/postgresql/9.6/main)" ]; then
- echo "Copying base"
- cp -r /var/lib/postgresql/9.6/base/* /var/lib/postgresql/9.6/main
- echo "Done"
-fi
-
-chmod -R 700 /var/lib/postgresql/9.6/main
-chown -R postgres /var/lib/postgresql/9.6/main
-
-echo "Starting postgres..."
-. /usr/share/postgresql-common/init.d-functions
-start 9.6
-tail -f /var/log/postgresql/postgresql-9.6-main.log