22 lines
1.3 KiB
Plaintext
22 lines
1.3 KiB
Plaintext
$ docker compose ps -a
|
|
NAME IMAGE STATE STATUS PORTS
|
|
mtusi-messenger-lab3-api-1 mtusi-messenger:lab3 running Up 35 seconds (healthy) 8080/tcp
|
|
mtusi-messenger-lab3-api-2 mtusi-messenger:lab3 running Up 35 seconds (healthy) 8080/tcp
|
|
mtusi-messenger-lab3-lb-1 haproxy:3.2.4-alpine running Up 29 seconds 127.0.0.1:8080->8080/tcp
|
|
mtusi-messenger-lab3-migrate-1 mtusi-messenger:lab3 exited Exited (0) 36 seconds ago
|
|
mtusi-messenger-lab3-postgres-1 postgres:17.6-alpine3.22 running Up 42 seconds (healthy) 5432/tcp
|
|
mtusi-messenger-lab3-redis-1 redis:8.4.0-alpine running Up 42 seconds (healthy) 6379/tcp
|
|
|
|
$ for i in 1..6: curl -sD - http://localhost:8080/health/ready | grep X-Instance-Id
|
|
x-instance-id: 236cb759e825
|
|
x-instance-id: 787a253aa6a6
|
|
x-instance-id: 236cb759e825
|
|
x-instance-id: 787a253aa6a6
|
|
x-instance-id: 236cb759e825
|
|
x-instance-id: 787a253aa6a6
|
|
|
|
# X-Instance-Id = HOSTNAME = short container id of the replica
|
|
NAME CONTAINER ID STATE STATUS
|
|
mtusi-messenger-lab3-api-1 236cb759e825 running Up 35 seconds (healthy)
|
|
mtusi-messenger-lab3-api-2 787a253aa6a6 running Up 35 seconds (healthy)
|