-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
145 lines (132 loc) · 3.7 KB
/
docker-compose.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
version: "3"
services:
db-src-set-public-schema-full: &db
image: autodesk/postgres-pglogical-docker:13
environment:
POSTGRES_PASSWORD: postgres
PGDATA: /tmp/pgdata
restart: on-failure
networks:
datacenter:
ipv4_address: 10.5.0.5
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
db-dst-set-public-schema-full:
<<: *db
networks:
datacenter:
ipv4_address: 10.5.0.6
db-src-set-non-public-schema-full:
<<: *db
networks:
datacenter:
ipv4_address: 10.5.0.7
db-dst-set-non-public-schema-full:
<<: *db
networks:
datacenter:
ipv4_address: 10.5.0.8
db-src-set-public-schema-exodus:
<<: *db
networks:
datacenter:
ipv4_address: 10.5.0.9
db-dst-set-public-schema-exodus:
<<: *db
networks:
datacenter:
ipv4_address: 10.5.0.10
db-src-set-non-public-schema-exodus:
<<: *db
networks:
datacenter:
ipv4_address: 10.5.0.11
db-dst-set-non-public-schema-exodus:
<<: *db
networks:
datacenter:
ipv4_address: 10.5.0.12
flake8:
image: autodesk/pgbelt:latest
command: poetry run flake8
networks:
- datacenter
black:
image: autodesk/pgbelt:latest
command: poetry run black .
networks:
- datacenter
tests:
image: autodesk/pgbelt:latest
environment:
PUBLIC_FULL_SRC_IP: 10.5.0.5
PUBLIC_FULL_DST_IP: 10.5.0.6
NONPUBLIC_FULL_SRC_IP: 10.5.0.7
NONPUBLIC_FULL_DST_IP: 10.5.0.8
PUBLIC_EXODUS_SRC_IP: 10.5.0.9
PUBLIC_EXODUS_DST_IP: 10.5.0.10
NONPUBLIC_EXODUS_SRC_IP: 10.5.0.11
NONPUBLIC_EXODUS_DST_IP: 10.5.0.12
command: poetry run pytest --cov=pgbelt tests/
depends_on:
db-src-set-public-schema-full:
condition: service_healthy
db-dst-set-public-schema-full:
condition: service_healthy
db-src-set-non-public-schema-full:
condition: service_healthy
db-dst-set-non-public-schema-full:
condition: service_healthy
db-src-set-public-schema-exodus:
condition: service_healthy
db-dst-set-public-schema-exodus:
condition: service_healthy
db-src-set-non-public-schema-exodus:
condition: service_healthy
db-dst-set-non-public-schema-exodus:
condition: service_healthy
networks:
- datacenter
localtest:
image: autodesk/pgbelt:latest
environment:
PUBLIC_FULL_SRC_IP: 10.5.0.5
PUBLIC_FULL_DST_IP: 10.5.0.6
NONPUBLIC_FULL_SRC_IP: 10.5.0.7
NONPUBLIC_FULL_DST_IP: 10.5.0.8
PUBLIC_EXODUS_SRC_IP: 10.5.0.9
PUBLIC_EXODUS_DST_IP: 10.5.0.10
NONPUBLIC_EXODUS_SRC_IP: 10.5.0.11
NONPUBLIC_EXODUS_DST_IP: 10.5.0.12
command: bash -c "cd /pgbelt-volume/ && poetry run python3 tests/integration/conftest.py --non-public-schema && pip3 install -e . && bash"
depends_on:
db-src-set-public-schema-full:
condition: service_healthy
db-dst-set-public-schema-full:
condition: service_healthy
db-src-set-non-public-schema-full:
condition: service_healthy
db-dst-set-non-public-schema-full:
condition: service_healthy
db-src-set-public-schema-exodus:
condition: service_healthy
db-dst-set-public-schema-exodus:
condition: service_healthy
db-src-set-non-public-schema-exodus:
condition: service_healthy
db-dst-set-non-public-schema-exodus:
condition: service_healthy
networks:
- datacenter
volumes:
- ./:/pgbelt-volume/:rw
networks:
datacenter:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1