Several variants of the container

This commit is contained in:
Bart Broere committed 2026-10-21 11:48:08 +02:00
1 parent f0fb9ddc74
commit e7ef15fc79
6 files changed
+202 -48

No files matched your search

+69
View File
@@ -0,0 +1,69 @@
# SPDX-FileCopyrightText: 2026 Bart Broere
# SPDX-License-Identifier: GPL-3.0-or-later
#
# peo, PostgreSQL with Apache AGE and pgAdmin as separate containers. peo runs
# from the slim image (see Containerfile). Start with:
#
# POSTGRES_PASSWORD=secret podman compose up -d
#
# or put POSTGRES_PASSWORD in a .env file next to this one.
name: peo
services:
postgres:
image: docker.io/apache/age:release_PG18_1.8.0
command: ["postgres", "-c", "shared_preload_libraries=age"]
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD, for example in a .env file}
PEO_DEFAULT_GRAPH: ${PEO_DEFAULT_GRAPH:-neo4j}
volumes:
- postgres-data:/var/lib/postgresql
# Creates the default graph when the database is initialised.
- ./container/initdb/10-peo.sh:/docker-entrypoint-initdb.d/10-peo.sh:ro
ports:
- "${PEO_POSTGRES_PORT:-5432}:5432"
healthcheck:
# Over TCP, so the temporary server that runs the init scripts does not count.
test: ["CMD", "pg_isready", "--host", "127.0.0.1", "--username", "postgres"]
interval: 5s
timeout: 5s
retries: 20
peo:
build:
context: .
dockerfile: Containerfile
target: slim
image: localhost/peo:slim
environment:
PEO_PG_HOST: postgres
PEO_PG_DATABASE: postgres
PEO_DEFAULT_GRAPH: ${PEO_DEFAULT_GRAPH:-neo4j}
PEO_LOG_LEVEL: ${PEO_LOG_LEVEL:-INFO}
ports:
- "7474:7474"
- "7687:7687"
depends_on:
postgres:
condition: service_healthy
pgadmin:
image: docker.io/dpage/pgadmin4:9.18
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-admin@example.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-${POSTGRES_PASSWORD}}
PGADMIN_CONFIG_UPGRADE_CHECK_ENABLED: "False"
volumes:
- pgadmin-data:/var/lib/pgadmin
# Registers the postgres service on first start.
- ./container/pgadmin/compose-servers.json:/pgadmin4/servers.json:ro
ports:
- "5050:80"
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data:
pgadmin-data: