2025-04-13 18:38:30 +02:00
|
|
|
volumes:
|
|
|
|
|
ddon-psql-data:
|
|
|
|
|
|
|
|
|
|
services:
|
2025-04-18 16:58:42 +02:00
|
|
|
db:
|
|
|
|
|
container_name: db
|
2025-05-20 22:17:11 +02:00
|
|
|
image: postgres:17
|
2025-04-13 18:38:30 +02:00
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
restart: no
|
|
|
|
|
volumes:
|
|
|
|
|
- ddon-psql-data:/var/lib/postgresql/data
|
2025-04-20 20:45:14 +02:00
|
|
|
- ../../Arrowgene.Ddon.Database/Files/Database/Script/schema_postgres.sql:/docker-entrypoint-initdb.d/schema_postgres.sql:ro
|
2025-05-20 22:17:11 +02:00
|
|
|
- ./postgresql.conf:/etc/postgresql/postgresql.conf:ro
|
2025-04-13 18:38:30 +02:00
|
|
|
environment:
|
2025-04-18 16:58:42 +02:00
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
|
- POSTGRES_PASSWORD=postgres
|
2025-04-13 18:38:30 +02:00
|
|
|
- POSTGRES_DB=postgres
|
|
|
|
|
- POSTGRES_INITDB_ARGS=--auth=scram-sha-256 --lc-numeric=en_US.UTF-8
|
|
|
|
|
command: postgres -c config_file=/etc/postgresql/postgresql.conf
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 1s
|
|
|
|
|
retries: 3
|
|
|
|
|
|
|
|
|
|
pgloader:
|
|
|
|
|
image: dimitri/pgloader:latest
|
|
|
|
|
depends_on:
|
2025-04-18 16:58:42 +02:00
|
|
|
db:
|
2025-04-13 18:38:30 +02:00
|
|
|
condition: service_healthy
|
|
|
|
|
volumes:
|
2026-03-17 09:29:37 +08:00
|
|
|
- ../../Arrowgene.Ddon.Cli/bin/Debug/net10.0/Files/Database/db.sqlite:/db.sqlite:ro
|
2025-04-13 22:42:48 +02:00
|
|
|
- ./pgloader.load:/pgloader.load:ro
|
2025-04-13 18:38:30 +02:00
|
|
|
entrypoint: pgloader
|
2025-04-13 22:42:48 +02:00
|
|
|
# command: sqlite:///db.sqlite postgresql://root:root@psql:5432/postgres
|
2025-04-18 16:58:42 +02:00
|
|
|
command: -v /pgloader.load
|