Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 23c3476

Browse files
Merge remote-tracking branch 'origin/master' into master-XL9_5_STABLE
Conflicts: .version lib/postgres-xl
2 parents 65d9150 + b21fb10 commit 23c3476

File tree

7 files changed

+68
-38
lines changed

7 files changed

+68
-38
lines changed

‎Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt-get update && \
1212
daemontools \
1313
flex \
1414
libreadline-dev \
15+
netcat \
1516
zlib1g-dev && \
1617
rm -rf /var/lib/apt/lists/*
1718

‎LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright © 2016-2019 tiredpixel, Pavouk OÜ
3+
Copyright © 2016-2019, tiredpixel (https://www.tiredpixel.com/), Pavouk OÜ (https://www.pavouk.tech/), and other contributors (https://github.com/pavouk-0/postgres-xl-docker/graphs/contributors).
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Other topologies are possible; you likely only need to edit `docker-compose.yml`
4848

4949
## Build
5050

51+
Clone repository.
52+
Pull source with `git submodule update --init --recursive`.
5153
Edit `docker-compose.yml` to reflect the desired topology.
5254

5355
Build services by bringing them up.
@@ -159,4 +161,8 @@ Pavouk OÜ | [https://www.pavouk.tech/](https://www.pavouk.tech/) | [en@pavouk.t
159161

160162
## Licence
161163

162-
Copyright © 2016-2019 [tiredpixel](https://www.tiredpixel.com/), [Pavouk OÜ](https://www.pavouk.tech/). It is free software, released under the MIT licence, and may be redistributed under the terms specified in `LICENSE`.
164+
Copyright © 2016-2019
165+
[tiredpixel](https://www.tiredpixel.com/),
166+
[Pavouk OÜ](https://www.pavouk.tech/),
167+
and other [contributors](https://github.com/pavouk-0/postgres-xl-docker/graphs/contributors).
168+
It is free software, released under the MIT licence, and may be redistributed under the terms specified in `LICENSE`.

‎bin/docker-healthcheck-coord

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
#!/bin/sh -eu
1+
#!/bin/bash -eu
22

33
bootstrapped=.bootstrapped
4-
4+
sleep_int_max=30
5+
#-------------------------------------------------------------------------------
56
if [ ! -f "$bootstrapped" ]; then
6-
createuser "${PG_USER_HEALTHCHECK}" || true
7+
sleep_int=$(((RANDOM % sleep_int_max) + 1))
8+
echo "Sleeping to avoid race-condition (!) [$sleep_int s]"
9+
sleep "$sleep_int"
10+
11+
createuser \
12+
-h "${PG_HOST}" \
13+
-p "${PG_PORT}" \
14+
"${PG_USER_HEALTHCHECK}" || true
715

8-
createdb "${PG_USER_HEALTHCHECK}" || true
16+
createdb \
17+
-h "${PG_HOST}" \
18+
-p "${PG_PORT}" \
19+
-O "${PG_USER_HEALTHCHECK}" \
20+
"${PG_USER_HEALTHCHECK}" || true
921

1022
psql \
1123
-h "${PG_HOST}" \

‎ci/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ ARG PG_USER=postgres
77
#-------------------------------------------------------------------------------
88
RUN apt-get update && \
99
apt-get install -y --no-install-recommends \
10-
libreadline-dev && \
10+
libreadline-dev \
11+
netcat && \
1112
rm -rf /var/lib/apt/lists/*
1213

1314
RUN useradd ${PG_USER} -d ${PG_HOME} && \

‎docker-compose.image.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
version: "3"
1+
version: "3.7"
2+
3+
x-custom:
4+
shared_image: &shared_image
5+
image: pavouk0/postgres-xl:XL_10_R1_1-313-g31dfe47
6+
27
services:
38
db_gtm_1:
49
environment:
510
- PG_HOST=0.0.0.0
611
- PG_NODE=gtm_1
712
- PG_PORT=6666
8-
image: pavouk0/postgres-xl:latest
13+
<<: *shared_image
914
command: docker-cmd-gtm
1015
entrypoint: docker-entrypoint-gtm
1116
volumes:
@@ -21,7 +26,7 @@ services:
2126
- PG_HOST=0.0.0.0
2227
- PG_NODE=coord_1
2328
- PG_PORT=5432
24-
image: pavouk0/postgres-xl:latest
29+
<<: *shared_image
2530
command: docker-cmd-coord
2631
entrypoint: docker-entrypoint-coord
2732
volumes:
@@ -40,7 +45,7 @@ services:
4045
- PG_HOST=0.0.0.0
4146
- PG_NODE=coord_2
4247
- PG_PORT=5432
43-
image: pavouk0/postgres-xl:latest
48+
<<: *shared_image
4449
command: docker-cmd-coord
4550
entrypoint: docker-entrypoint-coord
4651
volumes:
@@ -59,7 +64,7 @@ services:
5964
- PG_HOST=0.0.0.0
6065
- PG_NODE=data_1
6166
- PG_PORT=5432
62-
image: pavouk0/postgres-xl:latest
67+
<<: *shared_image
6368
command: docker-cmd-data
6469
entrypoint: docker-entrypoint-data
6570
depends_on:
@@ -77,7 +82,7 @@ services:
7782
- PG_HOST=0.0.0.0
7883
- PG_NODE=data_2
7984
- PG_PORT=5432
80-
image: pavouk0/postgres-xl:latest
85+
<<: *shared_image
8186
command: docker-cmd-data
8287
entrypoint: docker-entrypoint-data
8388
depends_on:

‎docker-compose.swarm.yml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
version: "3.7"
2+
3+
x-custom:
4+
shared_image: &shared_image
5+
image: pavouk0/postgres-xl:XL_10_R1_1-313-g31dfe47
6+
27
services:
38
#-----------------------------------------------------------------------------
49
db_gtm_1:
510
environment:
611
- PG_HOST=0.0.0.0
712
- PG_NODE=gtm_1
813
- PG_PORT=6666
9-
image: pavouk0/postgres-xl:latest # pin for prod !
14+
<<: *shared_image
1015
command: docker-cmd-gtm
1116
entrypoint: docker-entrypoint-gtm
1217
volumes:
@@ -15,18 +20,18 @@ services:
1520
- db_a
1621
healthcheck:
1722
test: ["CMD", "docker-healthcheck-gtm"]
18-
deploy:
19-
placement:
20-
constraints:
21-
- node.labels.grp == dbxl # assumes shared volume storage, or 1-node
23+
# deploy:
24+
# placement:
25+
# constraints:
26+
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
2227
db_coord_1:
2328
environment:
2429
- PG_GTM_HOST=db_gtm_1
2530
- PG_GTM_PORT=6666
2631
- PG_HOST=0.0.0.0
2732
- PG_NODE=coord_1
2833
- PG_PORT=5432
29-
image: pavouk0/postgres-xl:latest # pin for prod !
34+
<<: *shared_image
3035
command: docker-cmd-coord
3136
entrypoint: docker-entrypoint-coord
3237
volumes:
@@ -36,18 +41,18 @@ services:
3641
- db_b
3742
healthcheck:
3843
test: ["CMD", "docker-healthcheck-coord"]
39-
deploy:
40-
placement:
41-
constraints:
42-
- node.labels.grp == dbxl # assumes shared volume storage, or 1-node
44+
# deploy:
45+
# placement:
46+
# constraints:
47+
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
4348
db_coord_2:
4449
environment:
4550
- PG_GTM_HOST=db_gtm_1
4651
- PG_GTM_PORT=6666
4752
- PG_HOST=0.0.0.0
4853
- PG_NODE=coord_2
4954
- PG_PORT=5432
50-
image: pavouk0/postgres-xl:latest # pin for prod !
55+
<<: *shared_image
5156
command: docker-cmd-coord
5257
entrypoint: docker-entrypoint-coord
5358
volumes:
@@ -57,18 +62,18 @@ services:
5762
- db_b
5863
healthcheck:
5964
test: ["CMD", "docker-healthcheck-coord"]
60-
deploy:
61-
placement:
62-
constraints:
63-
- node.labels.grp == dbxl # assumes shared volume storage, or 1-node
65+
# deploy:
66+
# placement:
67+
# constraints:
68+
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
6469
db_data_1:
6570
environment:
6671
- PG_GTM_HOST=db_gtm_1
6772
- PG_GTM_PORT=6666
6873
- PG_HOST=0.0.0.0
6974
- PG_NODE=data_1
7075
- PG_PORT=5432
71-
image: pavouk0/postgres-xl:latest # pin for prod !
76+
<<: *shared_image
7277
command: docker-cmd-data
7378
entrypoint: docker-entrypoint-data
7479
volumes:
@@ -77,18 +82,18 @@ services:
7782
- db_a
7883
healthcheck:
7984
test: ["CMD", "docker-healthcheck-data"]
80-
deploy:
81-
placement:
82-
constraints:
83-
- node.labels.grp == dbxl # assumes shared volume storage, or 1-node
85+
# deploy:
86+
# placement:
87+
# constraints:
88+
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
8489
db_data_2:
8590
environment:
8691
- PG_GTM_HOST=db_gtm_1
8792
- PG_GTM_PORT=6666
8893
- PG_HOST=0.0.0.0
8994
- PG_NODE=data_2
9095
- PG_PORT=5432
91-
image: pavouk0/postgres-xl:latest # pin for prod !
96+
<<: *shared_image
9297
command: docker-cmd-data
9398
entrypoint: docker-entrypoint-data
9499
volumes:
@@ -97,10 +102,10 @@ services:
97102
- db_a
98103
healthcheck:
99104
test: ["CMD", "docker-healthcheck-data"]
100-
deploy:
101-
placement:
102-
constraints:
103-
- node.labels.grp == dbxl # assumes shared volume storage, or 1-node
105+
# deploy:
106+
# placement:
107+
# constraints:
108+
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
104109
#-----------------------------------------------------------------------------
105110
volumes:
106111
db_gtm_1: {}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /