postgREST : OK
This commit is contained in:
62
compose.yaml
62
compose.yaml
@@ -1,10 +1,9 @@
|
||||
services:
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Proxy
|
||||
# Proxy inverse
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Caddy
|
||||
# Web server, load balancer, and reverse proxy
|
||||
# https://caddyserver.com/
|
||||
@@ -27,8 +26,8 @@ services:
|
||||
labels:
|
||||
caddy: "static.localhost"
|
||||
caddy.root: "* /srv/www"
|
||||
caddy.file_server: ""
|
||||
caddy.tls: internal
|
||||
caddy.file_server: "" # Active le serveur de fichiers statiques
|
||||
caddy.tls: internal # HTTPS auto-signé géré par Caddy
|
||||
|
||||
whoami:
|
||||
image: traefik/whoami
|
||||
@@ -45,7 +44,6 @@ services:
|
||||
# Base de données relationnelles
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
database:
|
||||
image: iut/pgsql:2025-12
|
||||
environment:
|
||||
@@ -58,6 +56,8 @@ services:
|
||||
- ./data:/tmp:z
|
||||
ports:
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- caddy_net
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "--username", "${COMPOSE_PROJECT_NAME}", "--dbname", "${COMPOSE_PROJECT_NAME}"]
|
||||
interval: 10s
|
||||
@@ -65,15 +65,20 @@ services:
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Administration
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
# pgAdmin
|
||||
# Rich administration and development platform for PostgreSQL.
|
||||
# https://www.pgadmin.org/
|
||||
|
||||
pgadmin:
|
||||
image: dpage/pgadmin4:9.8
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
caddy:
|
||||
condition: service_started
|
||||
restart: "no"
|
||||
configs:
|
||||
- source: pgadmin_config
|
||||
@@ -95,7 +100,6 @@ services:
|
||||
# Documents
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# CouchDB
|
||||
# Single-node document database
|
||||
# https://couchdb.apache.org/
|
||||
@@ -103,11 +107,13 @@ services:
|
||||
image: couchdb:3.5
|
||||
volumes:
|
||||
- couchdb_data:/opt/couchdb/data
|
||||
ports:
|
||||
- "5984:5984"
|
||||
environment:
|
||||
COUCHDB_USER: ${COUCHDB_USER}
|
||||
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD}
|
||||
labels:
|
||||
caddy: couchdb.localhost
|
||||
caddy.reverse_proxy: "{{upstreams 5984}}"
|
||||
caddy.tls: internal
|
||||
|
||||
# MongoDB
|
||||
#
|
||||
@@ -152,19 +158,23 @@ services:
|
||||
neo4j:
|
||||
image: neo4j:5.26.12-community
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
volumes:
|
||||
- neo4j_data:/data
|
||||
- neo4j_logs:/logs
|
||||
environment:
|
||||
NEO4J_dbms_connector_https_enabled: "false"
|
||||
NEO4J_AUTH: neo4j/${DB_ROOT_PASSWORD:-!ChangeMe!}
|
||||
NEO4J_AUTH: neo4j/${NEO4J_PASSWORD:-!ChangeMe!}
|
||||
networks:
|
||||
- caddy_net
|
||||
labels:
|
||||
caddy: neo4j.localhost
|
||||
caddy.reverse_proxy: "{{upstreams 7474}}"
|
||||
caddy.tls: internal
|
||||
|
||||
# PostGraphile
|
||||
# Instant GraphQL API
|
||||
# https://www.graphile.org/postgraphile/
|
||||
|
||||
postgraphile:
|
||||
image: iut/postgraphile:2025-12
|
||||
restart: "no"
|
||||
@@ -182,25 +192,23 @@ services:
|
||||
"--append-plugins",
|
||||
"postgraphile-plugin-connection-filter,postgraphile-plugin-fulltext-filter,@graphile/postgis,postgraphile-plugin-connection-filter-postgis"
|
||||
]
|
||||
ports:
|
||||
- 3006:5000
|
||||
networks:
|
||||
- caddy_net
|
||||
environment:
|
||||
- PGHOST=${POSTGRAPHILE_HOST:-postgresql}
|
||||
- PGHOST=${POSTGRAPHILE_HOST:-database}
|
||||
- PGPORT=${POSTGRAPHILE_DB_PORT:-5432}
|
||||
- PGUSER=${POSTGRAPHILE_DB_USER:-postgraphile}
|
||||
- PGPASSWORD=${DB_PASSWORD:-!ChangeMe!}
|
||||
- PGPASSWORD=${POSTGRAPHILE_PASSWORD:-9013}
|
||||
- PGDATABASE=${COMPOSE_PROJECT_NAME}
|
||||
labels:
|
||||
caddy: postgraphile.localhost
|
||||
caddy.reverse_proxy: "{{upstreams 5000}}"
|
||||
caddy.tls: internal
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Web API
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# PostgREST
|
||||
# Serve a fully RESTful API from any existing PostgreSQL database.
|
||||
# It provides a cleaner, more standards-compliant, faster API than you are likely to write from scratch.
|
||||
@@ -211,11 +219,13 @@ services:
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
caddy:
|
||||
condition: service_started
|
||||
command: postgrest
|
||||
environment:
|
||||
PGRST_DB_URI: postgres://${POSTGREST_USER:-postgrest}:${POSTGREST_PASSWORD}@${POSTGREST_HOST:-database}:${POSTGREST_DB_PORT:-5432}/${COMPOSE_PROJECT_NAME}
|
||||
PGRST_DB_SCHEMAS: ${POSTGREST_DB_SCHEMAS:-public}
|
||||
PGRST_DB_ANON_ROLE: ${POSTGREST_DB_ANON_ROLE:-role_web}
|
||||
PGRST_DB_ANON_ROLE: ${POSTGREST_DB_ANON_ROLE:-anonyme}
|
||||
PGRST_JWT_SECRET: ${POSTGREST_JWT_SECRET:-ChangeMeChangeMeChangeMeChangeMe}
|
||||
PGRST_ADMIN_SERVER_PORT: 3055
|
||||
PGRST_SERVER_PORT: 80
|
||||
@@ -236,7 +246,7 @@ services:
|
||||
API_REFERENCE_CONFIG: |
|
||||
{
|
||||
"sources":[
|
||||
{ "url": "https://postgrest/?format=json" }
|
||||
{ "url": "https://postgrest.localhost" }
|
||||
],
|
||||
"theme": "purple"
|
||||
}
|
||||
@@ -354,11 +364,11 @@ services:
|
||||
caddy: rabbitmq.localhost
|
||||
caddy.reverse_proxy: "{{upstreams 15672}}"
|
||||
caddy.tls: internal
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Observabilité - Télémétrie
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Grafana
|
||||
# Open source analytics & monitoring solution for every database.
|
||||
# https://grafana.com/
|
||||
@@ -370,8 +380,8 @@ services:
|
||||
limits:
|
||||
memory: 100M
|
||||
configs:
|
||||
- source: grafana_datasources
|
||||
target: /etc/grafana/provisioning/datasources
|
||||
- source: grafana_provisioning
|
||||
target: /etc/grafana/provisioning
|
||||
- source: grafana_dashboards
|
||||
target: /etc/grafana/dashboards
|
||||
volumes:
|
||||
@@ -428,12 +438,12 @@ volumes:
|
||||
configs:
|
||||
pgadmin_config:
|
||||
file: ./pgadmin-servers.json
|
||||
grafana_datasources:
|
||||
file: ./grafana/provisionning/datasources
|
||||
grafana_provisioning:
|
||||
file: ./grafana/provisioning
|
||||
grafana_dashboards:
|
||||
file: ./grafana/provisionning/dashboards
|
||||
file: ./grafana/dashboards
|
||||
prometheus_config:
|
||||
file: ./prometheus
|
||||
file: ./prometheus.yml
|
||||
|
||||
networks:
|
||||
caddy_net:
|
||||
|
||||
Reference in New Issue
Block a user