services:
postgres:
image: postgres:16-alpine
profiles: ["postgres"]
environment:
POSTGRES_USER: secafs
POSTGRES_PASSWORD: secafs
POSTGRES_DB: secafs
ports: ["5433:5432"]
volumes:
- ./.dev-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "secafs"]
interval: 2s
timeout: 2s
retries: 15
opengauss:
image: enmotech/opengauss:6.0.0
restart: unless-stopped
profiles: ["opengauss", "default"]
privileged: true
environment:
GS_USERNAME: secafs
GS_PASSWORD: "Secafs!123"
ports: ["5433:5432"]
volumes:
- ./.dev-ogdata:/var/lib/opengauss/data
- ./scripts/opengauss-init.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD-SHELL", "export LD_LIBRARY_PATH=/usr/local/opengauss/lib && /usr/local/opengauss/bin/gsql -d postgres -p 5432 -U secafs -W Secafs!123 -c 'SELECT 1' > /dev/null 2>&1 || exit 1"]
interval: 5s
timeout: 10s
retries: 30