File tree 2 files changed +23
-4
lines changed
2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ with PostgreSQL:
14
14
``` bash
15
15
docker-compose up
16
16
```
17
- Alternatively, with YugabyteDB (PostgreSQL-compatible distributed SQL)
17
+ Alternatively, with YugabyteDB (PostgreSQL-compatible distributed SQL) starting 3 nodes:
18
18
``` bash
19
- docker-compose -f docker-compose-yugabytedb.yml up
19
+ docker-compose -f docker-compose-yugabytedb.yml up -d --scale dist=0
20
+ docker-compose -f docker-compose-yugabytedb.yml up -d --scale dist=1
21
+ docker-compose -f docker-compose-yugabytedb.yml up -d --scale dist=2
20
22
```
21
23
22
24
You need to install packages with
Original file line number Diff line number Diff line change 1
1
version : " 3.8" # Specify Docker Compose version
2
2
3
3
services :
4
- postgres :
4
+ yugabytedb :
5
5
image : yugabytedb/yugabyte:latest
6
6
command : yugabyted start --background=false --ysql_port=5432
7
7
ports :
8
8
- " 5432:5432"
9
+ - " 15433:15433"
10
+ healthcheck :
11
+ interval : 15s
12
+ timeout : 3s
13
+ test : postgres/bin/pg_isready -h yugabytedb -p 5432
14
+
15
+ dist :
16
+ image : yugabytedb/yugabyte:latest
17
+ command : yugabyted start --join yugabytedb --background=false --ysql_port=5432
18
+ deploy :
19
+ replicas : 0
20
+ restart_policy :
21
+ condition : on-failure
22
+ depends_on :
23
+ yugabytedb :
24
+ condition : service_healthy
9
25
10
26
pgadmin :
11
27
container_name : pgadmin_container
@@ -23,5 +39,6 @@ services:
23
39
- ./docker/pgAdmin/pgpass:/pgpass
24
40
- ./docker/pgAdmin/servers.json:/pgadmin4/servers.json
25
41
depends_on :
26
- - postgres
42
+ yugabytedb :
43
+ condition : service_healthy
27
44
restart : unless-stopped
You can’t perform that action at this time.
0 commit comments