-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-postgres-test.yml
More file actions
38 lines (37 loc) · 1.04 KB
/
docker-compose-postgres-test.yml
File metadata and controls
38 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
services:
# PostgreSQL Database for testing employee_id and last_login features
postgres:
image: postgres:16
container_name: baton-postgres-test
environment:
POSTGRES_USER: baton
POSTGRES_PASSWORD: password
POSTGRES_DB: batondb
ports:
- "5432:5432"
volumes:
- ./test/postgres-init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD", "pg_isready", "-U", "baton", "-d", "batondb"]
interval: 5s
timeout: 5s
retries: 5
# Connector test container
baton-sql-test:
build:
context: .
dockerfile: Dockerfile.test
container_name: baton-sql-postgres-test
depends_on:
postgres:
condition: service_healthy
volumes:
- ./examples:/examples
- ./test:/test
command: >
/bin/bash -c "
# Wait for PostgreSQL to be fully ready
sleep 5
# Run the baton-sql connector with PostgreSQL test configuration
/app/baton-sql --config-path /examples/postgres-test.yml --log-level debug
"