2024-11-12 17:02:53 +01:00
|
|
|
# Rx3-Docker/PostgreSQL Docker Image
|
2024-08-30 19:08:09 +02:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2024-11-12 17:02:53 +01:00
|
|
|
name: ${IMG_NAME}
|
2024-08-30 19:08:09 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
database:
|
2024-11-12 17:02:53 +01:00
|
|
|
container_name: ${IMG_NAME}
|
|
|
|
hostname: ${IMG_NAME}
|
|
|
|
|
|
|
|
image: ${IMG_URL}
|
2024-08-30 19:08:09 +02:00
|
|
|
|
|
|
|
build:
|
2024-11-12 17:02:53 +01:00
|
|
|
context: .
|
2024-08-30 19:08:09 +02:00
|
|
|
args:
|
2024-11-12 17:02:53 +01:00
|
|
|
IMG_NAME: ${IMG_NAME}
|
|
|
|
IMG_NAME_FULL: ${IMG_NAME_FULL}
|
|
|
|
IMG_VERSION: ${IMG_VERSION}
|
|
|
|
IMG_MAINTAINER: ${IMG_MAINTAINER}
|
|
|
|
IMG_FROM_URL: ${IMG_FROM_URL}
|
|
|
|
|
|
|
|
POSTGRESQL_LIB: ${DATABASE_LIB_DIR}
|
|
|
|
POSTGRESQL_DATA: ${DATABASE_DATA_DIR}
|
|
|
|
POSTGRESQL_PORT: ${DATABASE_PORT_MAIN_INT}
|
|
|
|
POSTSQL_LOG_DIR: ${DATABASE_LOG_POSTSQL_DIR}
|
2024-08-30 19:08:09 +02:00
|
|
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
environment:
|
|
|
|
POSTGRESQL_UID: ${POSTGRESQL_UID}
|
|
|
|
POSTGRESQL_GID: ${POSTGRESQL_GID}
|
|
|
|
POSTGRESQL_POSTGRES_PASSWORD: ${POSTGRESQL_POSTGRES_PASSWORD}
|
|
|
|
POSTGRESQL_DATABASE: ${POSTGRESQL_DATABASE}
|
|
|
|
POSTGRESQL_USER: ${POSTGRESQL_USER}
|
|
|
|
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
|
|
|
|
|
2024-10-29 09:12:02 +01:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRESQL_USER} -d ${POSTGRESQL_DATABASE}'"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 3
|
|
|
|
|
2024-08-30 19:08:09 +02:00
|
|
|
volumes:
|
2024-10-05 13:11:16 +02:00
|
|
|
- ./var/lib/pgsql/data:/var/lib/pgsql/data
|
2024-11-12 17:02:53 +01:00
|
|
|
- ./var/log/init:${DATABASE_LOG_INIT_DIR}
|
|
|
|
- ./var/log/supervisor:${DATABASE_LOG_SV_DIR}
|
|
|
|
- ./var/log/postgres:${DATABASE_LOG_POSTGRES_DIR}
|
|
|
|
|
2024-08-30 19:08:09 +02:00
|
|
|
ports:
|
2024-11-12 17:02:53 +01:00
|
|
|
- "127.0.0.1:${DATABASE_PORT_SV_EXT}:${DATABASE_PORT_SV_INT}"
|
|
|
|
- "127.0.0.1:${DATABASE_PORT_MAIN_EXT}:${DATABASE_PORT_MAIN_INT}"
|
|
|
|
|