Skip to content

Commit 7e1d693

Browse files
authored
Merge pull request #187 from citusdata/bump-docker-compose-3
2 parents 0eb397c + 52573a3 commit 7e1d693

File tree

5 files changed

+32
-7
lines changed

5 files changed

+32
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### citus-docker v9.2.4-2.docker (March 31, 2020) ###
2+
3+
* Add Docker Compose V3 support
4+
15
### citus-docker v9.2.4.docker (March 31, 2020) ###
26

37
* Bump Citus version to 9.2.4

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql.
3030
COPY 000-configure-stats.sh 001-create-citus-extension.sql /docker-entrypoint-initdb.d/
3131

3232
# add health check script
33-
COPY pg_healthcheck /
33+
COPY pg_healthcheck wait-for-manager.sh /
34+
RUN chmod +x /wait-for-manager.sh
3435

3536
# entry point unsets PGPASSWORD, but we need it to connect to workers
3637
# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303

docker-compose.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '2.1'
1+
version: '3'
22

33
services:
44
master:
@@ -15,11 +15,18 @@ services:
1515
worker:
1616
image: 'citusdata/citus:9.2.4'
1717
labels: ['com.citusdata.role=Worker']
18-
depends_on: { manager: { condition: service_healthy } }
18+
depends_on: [ manager ]
1919
environment: *AUTH
20+
command: "/wait-for-manager.sh"
21+
volumes:
22+
- healthcheck-volume:/healthcheck
2023
manager:
2124
container_name: "${COMPOSE_PROJECT_NAME:-citus}_manager"
22-
image: 'citusdata/membership-manager:0.2.1'
23-
volumes: ['/var/run/docker.sock:/var/run/docker.sock']
24-
depends_on: { master: { condition: service_healthy } }
25+
image: 'citusdata/membership-manager:0.3.0'
26+
volumes:
27+
- /var/run/docker.sock:/var/run/docker.sock
28+
- healthcheck-volume:/healthcheck
29+
depends_on: [ master ]
2530
environment: *AUTH
31+
volumes:
32+
healthcheck-volume:

nightly/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
environment: *AUTH
2020
manager:
2121
container_name: "${COMPOSE_PROJECT_NAME:-citus}_manager"
22-
image: 'citusdata/membership-manager:0.2.1'
22+
image: 'citusdata/membership-manager:latest'
2323
volumes: ['/var/run/docker.sock:/var/run/docker.sock']
2424
depends_on: { master: { condition: service_healthy } }
2525
environment: *AUTH

wait-for-manager.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# wait-for-manager.sh
3+
4+
set -e
5+
6+
until test -f /healthcheck/manager-ready ; do
7+
>&2 echo "Manager is not ready - sleeping"
8+
sleep 1
9+
done
10+
11+
>&2 echo "Manager is up - starting worker"
12+
13+
exec gosu postgres "/docker-entrypoint.sh" "postgres"

0 commit comments

Comments
 (0)