-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgsql.yml
More file actions
48 lines (45 loc) · 1001 Bytes
/
pgsql.yml
File metadata and controls
48 lines (45 loc) · 1001 Bytes
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
39
40
41
42
43
44
45
46
47
48
services:
db-pgsql:
build:
context: pgsql
dockerfile: Dockerfile
container_name: pgsql
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- list_sync-net
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 3
producer-pgsql:
build:
context: .
dockerfile: Dockerfile
depends_on:
db-pgsql:
condition: service_healthy
volumes:
- type: bind
read_only: false
source: ./list_sync/connector
target: /app/list_sync/connector
bind:
propagation: shared
selinux: z
working_dir: /app
command: "poetry run python list_sync/connector/pgsql_connector.py"
networks:
- list_sync-net
volumes:
pgdata:
networks:
list_sync-net:
driver: bridge