Environnement Docker et exercices
This commit is contained in:
22
compose.yaml
Normal file
22
compose.yaml
Normal 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:
|
||||
Reference in New Issue
Block a user