Environnement Docker et exercices

This commit is contained in:
2025-08-27 07:51:06 +02:00
parent 1228c169ff
commit 380d9e5e9f
5 changed files with 124 additions and 3 deletions

22
compose.yaml Normal file
View File

@@ -0,0 +1,22 @@
services:
database:
image: pgsql:2025.09
build:
context: ./pgsql
environment:
POSTGRES_INITDB_ARGS: "--locale-provider=icu --icu-locale=fr-FR"
POSTGRES_DB: ${COMPOSE_PROJECT_NAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
POSTGRES_USER: ${COMPOSE_PROJECT_NAME}
healthcheck:
test: ["CMD", "pg_isready", "-d", "${COMPOSE_PROJECT_NAME}", "-U", "${COMPOSE_PROJECT_NAME}"]
timeout: 5s
retries: 5
start_period: 20s
volumes:
- database_data:/var/lib/postgresql/data:rw
- ./pgsql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./pgsql/data:/tmp
volumes:
database_data: