Compare commits
No commits in common. "master" and "postgresql-mga9-1.0.0" have entirely different histories.
master
...
postgresql
35
.env
Normal file
35
.env
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Rx3 PostgreSQL Mageia-9 Docker Image
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Global Settings
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
IMG_ORG="rx3"
|
||||||
|
IMG_REGISTRY="docker.xor.rx3:5000"
|
||||||
|
IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Image Settings
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
IMG_NAME="postgresql-mga9"
|
||||||
|
IMG_FULL_NAME="Rx3 MariaDB Mageia-9 Docker Image"
|
||||||
|
IMG_VERSION="1.0.0"
|
||||||
|
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
|
||||||
|
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# User Settings
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
POSTGRESQL_UID=971
|
||||||
|
POSTGRESQL_GID=971
|
||||||
|
POSTGRESQL_POSTGRES_PASSWORD="postgresadmin"
|
||||||
|
POSTGRESQL_DATABASE="test"
|
||||||
|
POSTGRESQL_USER="test"
|
||||||
|
POSTGRESQL_PASSWORD="testadmin"
|
184
Dockerfile
184
Dockerfile
@ -1,122 +1,114 @@
|
|||||||
# Rx3-Docker/PosgreSQL Docker Image
|
# Rx3 PosgreSQL Mageia-9 Docker Image
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
ARG IMG_FROM_URL="rx3-docker/server:latest"
|
ARG IMG_URL_PREFIX="rx3"
|
||||||
|
|
||||||
FROM ${IMG_FROM_URL}
|
FROM ${IMG_URL_PREFIX}/server-mga9:1.1.2
|
||||||
|
|
||||||
ARG IMG_NAME
|
ARG IMG_NAME
|
||||||
ARG IMG_NAME_FULL
|
ARG IMG_FULL_NAME
|
||||||
ARG IMG_VERSION
|
ARG IMG_VERSION
|
||||||
ARG IMG_MAINTAINER
|
ARG IMG_MAINTAINER
|
||||||
|
|
||||||
LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL}
|
LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME}
|
||||||
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
|
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
|
||||||
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
|
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
|
||||||
LABEL maintainer=${IMG_MAINTAINER}
|
LABEL maintainer=${IMG_MAINTAINER}
|
||||||
|
|
||||||
ARG POSTGRESQL_LIB
|
ARG POSTGRESQL_LIB=/var/lib/pgsql
|
||||||
ARG POSTGRESQL_LOG
|
ARG POSTGRESQL_DATA=${POSTGRESQL_LIB}/data
|
||||||
ARG POSTGRESQL_PORT
|
ARG POSTGRESQL_PORT=5432
|
||||||
ARG POSTSQL_LOG_DIR
|
|
||||||
|
|
||||||
ARG POSTGRESQL_DATA="${POSTGRESQL_LIB}/data"
|
#---------------------------------------------------------------------------------------------------
|
||||||
ARG POSTSQL_LOG_FILE="${POSTSQL_LOG_DIR}/postsql.log"
|
ARG POSTGRESQLD='#!/bin/bash \n\
|
||||||
|
\n\
|
||||||
|
usermod -u ${POSTGRESQL_UID} postgres \n\
|
||||||
|
groupmod -g ${POSTGRESQL_GID} postgres \n\
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
\n\
|
||||||
ARG POSTGRESQLD='#!/bin/bash \n\
|
chown -R postgres:postgres '${POSTGRESQL_LIB}' /var/log/postgres /var/run/postgresql \n\
|
||||||
\n\
|
\n\
|
||||||
usermod -u ${POSTGRESQL_UID} postgres \n\
|
if [[ ! -f '${POSTGRESQL_DATA}/pg_hba.conf' ]] \n\
|
||||||
groupmod -g ${POSTGRESQL_GID} postgres \n\
|
then \n\
|
||||||
\n\
|
echo "ALTER USER postgres WITH PASSWORD `${POSTGRESQL_POSTGRES_PASSWORD}`;" >>/tmp/post.sql \n\
|
||||||
chown -R postgres:postgres '${POSTGRESQL_LIB}' /var/log/postgres /var/run/postgresql \n\
|
\n\
|
||||||
\n\
|
if [[ -n "${POSTGRESQL_DATABASE}" ]] \n\
|
||||||
if [[ ! -f '${POSTGRESQL_DATA}/pg_hba.conf' ]] \n\
|
then \n\
|
||||||
then \n\
|
echo "CREATE DATABASE ${POSTGRESQL_DATABASE};" >>/tmp/post.sql \n\
|
||||||
echo "ALTER USER postgres WITH PASSWORD `${POSTGRESQL_POSTGRES_PASSWORD}`;" >>/tmp/post.sql \n\
|
fi \n\
|
||||||
\n\
|
\n\
|
||||||
if [[ -n "${POSTGRESQL_DATABASE}" ]] \n\
|
if [[ -n "${POSTGRESQL_USER}" ]] && [[ -n "${POSTGRESQL_PASSWORD}" ]] \n\
|
||||||
then \n\
|
then \n\
|
||||||
echo "CREATE DATABASE \"${POSTGRESQL_DATABASE}\";" >>/tmp/post.sql \n\
|
echo "CREATE USER ${POSTGRESQL_USER} WITH PASSWORD `${POSTGRESQL_PASSWORD}`;" >>/tmp/post.sql \n\
|
||||||
fi \n\
|
\n\
|
||||||
\n\
|
if [[ -n "${POSTGRESQL_DATABASE}" ]] \n\
|
||||||
if [[ -n "${POSTGRESQL_USER}" ]] && [[ -n "${POSTGRESQL_PASSWORD}" ]] \n\
|
then \n\
|
||||||
then \n\
|
echo "GRANT ALL PRIVILEGES ON DATABASE ${POSTGRESQL_DATABASE} TO ${POSTGRESQL_USER};" >>/tmp/post.sql \n\
|
||||||
echo "CREATE USER \"${POSTGRESQL_USER}\" WITH PASSWORD `${POSTGRESQL_PASSWORD}`;" >>/tmp/post.sql \n\
|
fi \n\
|
||||||
\n\
|
fi \n\
|
||||||
if [[ -n "${POSTGRESQL_DATABASE}" ]] \n\
|
\n\
|
||||||
then \n\
|
su - postgres -c "/usr/libexec/postgresql_initdb.sh '${POSTGRESQL_DATA}'" \n\
|
||||||
echo "ALTER DATABASE \"${POSTGRESQL_DATABASE}\" OWNER TO \"${POSTGRESQL_USER}\";" >>/tmp/post.sql \n\
|
\n\
|
||||||
echo "GRANT ALL PRIVILEGES ON DATABASE \"${POSTGRESQL_DATABASE}\" TO \"${POSTGRESQL_USER}\";" >>/tmp/post.sql \n\
|
echo "# IPv4 extern connections:" >>'${POSTGRESQL_DATA}'/pg_hba.conf \n\
|
||||||
fi \n\
|
echo "host all all 0.0.0.0/0 password" >>'${POSTGRESQL_DATA}'/pg_hba.conf \n\
|
||||||
fi \n\
|
sed -i "s/#port = 5432/listen_addresses=`*`\\n#port = 5432/" '${POSTGRESQL_DATA}'/postgresql.conf \n\
|
||||||
\n\
|
|
||||||
su - postgres -c "/usr/libexec/postgresql_initdb.sh '${POSTGRESQL_DATA}'" \n\
|
|
||||||
\n\
|
|
||||||
echo "# IPv4 extern connections:" >>'${POSTGRESQL_DATA}'/pg_hba.conf \n\
|
|
||||||
echo "host all all 0.0.0.0/0 password" >>'${POSTGRESQL_DATA}'/pg_hba.conf \n\
|
|
||||||
sed -i "s/#port = 5432/listen_addresses=`*`\\n#port = 5432/" '${POSTGRESQL_DATA}'/postgresql.conf \n\
|
|
||||||
fi'
|
fi'
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
#command=/usr/bin/pg_ctl start -D '${POSTGRESQL_DATA}' -s -o "-p '${POSTGRESQL_PORT}'" -w -t 300 \n\
|
||||||
ARG POSTGRESQLD_INI='[program:postgresqld] \n\
|
#---------------------------------------------------------------------------------------------------
|
||||||
command=/usr/bin/postgres -D '${POSTGRESQL_DATA}' -p '${POSTGRESQL_PORT}' \n\
|
ARG POSTGRESQLD_INI='[program:postgresqld] \n\
|
||||||
|
command=/usr/bin/postgres -D '${POSTGRESQL_DATA}' -p '${POSTGRESQL_PORT}' \n\
|
||||||
user=postgres'
|
user=postgres'
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------
|
||||||
ARG POSTSQL='#!/bin/bash \n\
|
ARG POSTSQL='#!/bin/bash \n\
|
||||||
\n\
|
\n\
|
||||||
function log() { echo "$(date --rfc-3339=ns) PostSQL: $*" | tee -a '${POSTSQL_LOG_FILE}'; } \n\
|
function log() { echo "$(date --rfc-3339=ns) PostSQL: $*" | tee -a /var/log/postsql.log; } \n\
|
||||||
\n\
|
\n\
|
||||||
log "Starting" \n\
|
log "Starting" \n\
|
||||||
\n\
|
\n\
|
||||||
for i in {30..0} \n\
|
for i in {30..0} \n\
|
||||||
do \n\
|
do \n\
|
||||||
if psql --username=postgres <<< "SELECT 1" &> /dev/null \n\
|
if psql --username=postgres <<< "SELECT 1" &> /dev/null \n\
|
||||||
then \n\
|
then \n\
|
||||||
break \n\
|
break \n\
|
||||||
fi \n\
|
fi \n\
|
||||||
\n\
|
\n\
|
||||||
sleep 1 \n\
|
sleep 1 \n\
|
||||||
done \n\
|
done \n\
|
||||||
\n\
|
\n\
|
||||||
if [ "$i" = 0 ] \n\
|
if [ "$i" = 0 ] \n\
|
||||||
then \n\
|
then \n\
|
||||||
log "Unable to connect server" \n\
|
log "Unable to connect server" \n\
|
||||||
else \n\
|
else \n\
|
||||||
while read line \n\
|
while read line \n\
|
||||||
do \n\
|
do \n\
|
||||||
log "Executing: [${line}]" \n\
|
log "Executing: [${line}]" \n\
|
||||||
echo ${line} | psql --username=postgres \n\
|
echo ${line} | psql --username=postgres \n\
|
||||||
done < /tmp/post.sql \n\
|
done < /tmp/post.sql \n\
|
||||||
fi \n\
|
fi \n\
|
||||||
\n\
|
\n\
|
||||||
log "Completed"'
|
log "Completed"'
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------
|
||||||
ARG POSTSQL_INI='[program:postsql] \n\
|
ARG POSTSQL_INI='[program:postsql] \n\
|
||||||
command=/usr/local/sbin/postsql'
|
command=/usr/local/sbin/postsql'
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RUN urpmi.update -a \
|
RUN urpmi --force postgresql15 postgresql15-server postgresql15-pl \
|
||||||
&& urpmi --force postgresql15 postgresql15-server postgresql15-pl \
|
&& echo -e "${POSTGRESQLD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/postgresqld \
|
||||||
&& echo -e "${POSTGRESQLD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/postgresqld \
|
&& chmod a+x /etc/init.d/postgresqld \
|
||||||
&& chmod a+x /etc/init.d/postgresqld \
|
&& ln -s /etc/init.d/postgresqld /etc/rcD.d/S30postgresqld \
|
||||||
&& ln -s /etc/init.d/postgresqld /etc/rcD.d/S30postgresqld \
|
&& echo -e "${POSTGRESQLD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/postgresqld.ini \
|
||||||
&& echo -e "${POSTGRESQLD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/postgresqld.ini \
|
&& echo -e "${POSTSQL}" | sed -e "s/\`/'/g" -e 's/ *$//' > /usr/local/sbin/postsql \
|
||||||
&& echo -e "${POSTSQL}" | sed -e "s/\`/'/g" -e 's/ *$//' > /usr/local/sbin/postsql \
|
&& chmod a+x /usr/local/sbin/postsql \
|
||||||
&& chmod a+x /usr/local/sbin/postsql \
|
&& echo -e "${POSTSQL_INI}" | sed -e 's/ *$//' > /etc/supervisord.d/postsql.ini
|
||||||
&& echo -e "${POSTSQL_INI}" | sed -e 's/ *$//' > /etc/supervisord.d/postsql.ini
|
|
||||||
|
|
||||||
|
|
||||||
VOLUME ${POSTGRESQL_LIB}
|
VOLUME /var/lib/pgsql
|
||||||
VOLUME ${POSTGRESQL_LOG}
|
|
||||||
|
|
||||||
EXPOSE ${POSTGRESQL_PORT}
|
EXPOSE 5432
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
Welcome to Rx3-Docker/PostgreSQL docker image!
|
Welcome to Rx3/PostgreSQL-Mga9 docker image!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This project aims to build a PostgreSQL docker image used by other Rx3 packaging projects.
|
This is project aims to build a PostgreSQL + Mageia 9 docker image used by others Rx3 packaging projects.
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
- Curtently based on rx3-docker/server:1.2.2-mga9 image,
|
- Curtently based on rx3/server-mga9:1.1.2 image,
|
||||||
- Following env vars supported:
|
- Following env vars supported:
|
||||||
- POSTGRESQL_UID & POSTGRESQL_GID,
|
- POSTGRESQL_UID & POSTGRESQL_GID,
|
||||||
- POSTGRESQL_POSTGRES_PASSWORD,
|
- POSTGRESQL_POSTGRES_PASSWORD,
|
||||||
@ -19,4 +19,4 @@ Your Rx3 Team.
|
|||||||
|
|
||||||
--
|
--
|
||||||
arnaud@rx3.net
|
arnaud@rx3.net
|
||||||
https://git.rx3.org/gitea/rx3-docker/postgresql
|
https://git.rx3.org/gitea/rx3/postgresql-mga9
|
||||||
|
@ -1,63 +1,6 @@
|
|||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
Rx3-Docker/PostgreSQL V 1.1.3 - A. GIBERT - 2025/04/21
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- Use now rx3-docker/server:1.2.2-mga9 image.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
Rx3-Docker/PostgreSQL V 1.1.2 - A. GIBERT - 2025/03/10
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- Add "ALTER DATABASE" in postsql to change database owner to POSTGRESQL_USER,
|
|
||||||
- Update env.dist & compose files to fully support docker_service_add Docker Tools function.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
Rx3-Docker/PostgreSQL V 1.1.1 - A. GIBERT - 2025/03/08
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- Use now rx3-docker/server:1.2.1-mga9 image.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
Rx3-Docker/PostgreSQL V 1.1.0 - A. GIBERT - 2024/11/12
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- Move & Rename repo from Rx3/PostgreSQL-MGA9 to Rx3-Docker/PostgreSQL,
|
|
||||||
- New version naming standard,
|
|
||||||
- Now use docker_tools for .env building,
|
|
||||||
- Use now rx3-docker/server:1.2.0-mga9 image,
|
|
||||||
- Add /var/log/init, /var/log/supervisor & var/log/postgres volumes,
|
|
||||||
- Add healthcheck example in compose file.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
Rx3/PostgreSQL-Mga9 V 1.0.2 - A. GIBERT - 2024/10/05
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- Now use rx3/server-mga9:1.1.3 image,
|
|
||||||
- Variabilization of external server ports in env & compose file,
|
|
||||||
- Now use docker_tools for .env building.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
Rx3/PostgreSQL-Mga9 V 1.0.1 - A. GIBERT - 2024/08/31
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
- Move local database dir form ./pgsql/data to ./pgsql-data,
|
|
||||||
- Fix support of special chars in User & Database names.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Rx3/PostgreSQL-Mga9 V 1.0.0 - A. GIBERT - 2024/08/30
|
Rx3/PostgreSQL-Mga9 V 1.0.0 - A. GIBERT - 2024/08/30
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- Initial release,
|
- Initial release,
|
||||||
- Based on rx3/server-mga9:1.1.2 image.
|
- Based on server-mga9:1.1.2 image.
|
||||||
|
51
compose.yaml
51
compose.yaml
@ -1,54 +1,39 @@
|
|||||||
# Rx3-Docker/PostgreSQL Docker Image
|
# Rx3 PostgreSQL Mageia-9 Docker Image
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
name: ${DATABASE_IMG_NAME}
|
name: ${IMG_NAME}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
database:
|
database:
|
||||||
container_name: ${DATABASE_IMG_NAME}
|
container_name: ${IMG_NAME}
|
||||||
hostname: ${DATABASE_IMG_NAME}
|
|
||||||
|
|
||||||
image: ${DATABASE_IMG_URL}
|
image: ${IMG_URL}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
IMG_NAME: ${DATABASE_IMG_NAME}
|
- IMG_NAME=${IMG_NAME}
|
||||||
IMG_NAME_FULL: ${DATABASE_IMG_NAME_FULL}
|
- IMG_FULL_NAME=${IMG_FULL_NAME}
|
||||||
IMG_VERSION: ${DATABASE_IMG_VERSION}
|
- IMG_VERSION=${IMG_VERSION}
|
||||||
IMG_MAINTAINER: ${DATABASE_IMG_MAINTAINER}
|
- IMG_MAINTAINER=${IMG_MAINTAINER}
|
||||||
IMG_FROM_URL: ${DATABASE_IMG_FROM_URL}
|
- IMG_URL_PREFIX=${IMG_URL_PREFIX}
|
||||||
|
|
||||||
POSTGRESQL_LIB: ${DATABASE_LIB_INT}
|
|
||||||
POSTGRESQL_LOG: ${DATABASE_LOG_MAIN_INT}
|
|
||||||
POSTGRESQL_PORT: ${DATABASE_PORT_MAIN_INT}
|
|
||||||
POSTSQL_LOG_DIR: ${DATABASE_LOG_INIT_INT}
|
|
||||||
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
POSTGRESQL_UID: ${DATABASE_USER_ID}
|
POSTGRESQL_UID: ${POSTGRESQL_UID}
|
||||||
POSTGRESQL_GID: ${DATABASE_GROUP_ID}
|
POSTGRESQL_GID: ${POSTGRESQL_GID}
|
||||||
|
|
||||||
POSTGRESQL_POSTGRES_PASSWORD: ${POSTGRESQL_POSTGRES_PASSWORD}
|
POSTGRESQL_POSTGRES_PASSWORD: ${POSTGRESQL_POSTGRES_PASSWORD}
|
||||||
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
|
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
|
||||||
POSTGRESQL_USER: ${POSTGRESQL_USER}
|
POSTGRESQL_USER: ${POSTGRESQL_USER}
|
||||||
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
|
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
|
||||||
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRESQL_USER} -d ${POSTGRESQL_DATABASE}'"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./${DATABASE_LIB_EXT}:${DATABASE_LIB_INT}
|
- ./pgsql/data:/var/lib/pgsql/data
|
||||||
- ./${DATABASE_LOG_INIT_EXT}:${DATABASE_LOG_INIT_INT}
|
|
||||||
- ./${DATABASE_LOG_SV_EXT}:${DATABASE_LOG_SV_INT}
|
|
||||||
- ./${DATABASE_LOG_MAIN_EXT}:${DATABASE_LOG_MAIN_INT}
|
|
||||||
|
|
||||||
|
network_mode: bridge
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${DATABASE_PORT_SV_EXT}:${DATABASE_PORT_SV_INT}"
|
- "127.0.0.1:9013:9001"
|
||||||
- "127.0.0.1:${DATABASE_PORT_MAIN_EXT}:${DATABASE_PORT_MAIN_INT}"
|
- "127.0.0.1:8032:5432"
|
||||||
|
|
||||||
|
55
env.dist
55
env.dist
@ -1,55 +0,0 @@
|
|||||||
# Rx3-Docker/PostgreSQL Docker Image
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Global Settings
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
ORG_NAME="rx3-docker"
|
|
||||||
ORG_REGISTRY="docker.xor.rx3:5000"
|
|
||||||
ORG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
|
||||||
|
|
||||||
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Image Settings
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
HOST_NAME_PREFIX=""
|
|
||||||
|
|
||||||
PORT_ENV_OFFSET=0
|
|
||||||
|
|
||||||
PORT_SV_INT=9001
|
|
||||||
PORT_SV_OFFSET=1000
|
|
||||||
|
|
||||||
NETWORK_NAME=${HOST_NAME_PREFIX}
|
|
||||||
NETWORK_IF_NAME=br-${APPL_NAME_SHORT}-${APPL_ENV}
|
|
||||||
|
|
||||||
DOCKER_TOOLS_DEBUG=FALSE
|
|
||||||
|
|
||||||
DOCKER_TOOLS_VOLUME=SINGLE
|
|
||||||
#DOCKER_TOOLS_VOLUME=MIXED
|
|
||||||
#DOCKER_TOOLS_VOLUME=MERGED
|
|
||||||
#DOCKER_TOOLS_VOLUME=SPLIT
|
|
||||||
|
|
||||||
DOCKER_TOOLS_EXEPTION_LIBS="postgres:pgsql"
|
|
||||||
|
|
||||||
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
|
|
||||||
# | Variable | Service | Target Image | From Image | Module | Main Port | Admin Port | User | Group |
|
|
||||||
# | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id |
|
|
||||||
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
|
|
||||||
|
|
||||||
docker_service_add DATABASE database ${ORG_URL_PREFIX} postgresql "Rx3-Docker/PostgreSQL" 1.1.3-mga9 ${ORG_URL_PREFIX} server 1.2.2-mga9 postgres - 8032 5432 - - 983 981
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
# Database
|
|
||||||
#-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
POSTGRESQL_POSTGRES_PASSWORD="postgresadmin"
|
|
||||||
POSTGRESQL_DATABASE="test"
|
|
||||||
POSTGRESQL_USER="test"
|
|
||||||
POSTGRESQL_PASSWORD="testadmin"
|
|
4
var/lib/pgsql/.gitignore
vendored
4
var/lib/pgsql/.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
# Ignore everything in this directory
|
|
||||||
*
|
|
||||||
# Except this file
|
|
||||||
!.gitignore
|
|
4
var/log/init/.gitignore
vendored
4
var/log/init/.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
# Ignore everything in this directory
|
|
||||||
*
|
|
||||||
# Except this file
|
|
||||||
!.gitignore
|
|
4
var/log/postgres/.gitignore
vendored
4
var/log/postgres/.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
# Ignore everything in this directory
|
|
||||||
*
|
|
||||||
# Except this file
|
|
||||||
!.gitignore
|
|
4
var/log/supervisor/.gitignore
vendored
4
var/log/supervisor/.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
# Ignore everything in this directory
|
|
||||||
*
|
|
||||||
# Except this file
|
|
||||||
!.gitignore
|
|
Loading…
Reference in New Issue
Block a user