87 lines
2.2 KiB
YAML
87 lines
2.2 KiB
YAML
version: '3.7'
|
|
|
|
services:
|
|
|
|
db1:
|
|
image: library/postgres:9.6.17-alpine
|
|
ports:
|
|
- "5431:5432"
|
|
environment:
|
|
- "POSTGRES_DB=openfire"
|
|
- "POSTGRES_USER=openfire"
|
|
- "POSTGRES_PASSWORD=hunter2"
|
|
volumes:
|
|
- ./sql/federated/1:/docker-entrypoint-initdb.d
|
|
networks:
|
|
openfire-federated-net:
|
|
ipv4_address: 172.50.0.11
|
|
|
|
db2:
|
|
image: library/postgres:9.6.17-alpine
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
- "POSTGRES_DB=openfire"
|
|
- "POSTGRES_USER=openfire"
|
|
- "POSTGRES_PASSWORD=hunter2"
|
|
volumes:
|
|
- ./sql/federated/2:/docker-entrypoint-initdb.d
|
|
networks:
|
|
openfire-federated-net:
|
|
ipv4_address: 172.50.0.21
|
|
|
|
xmpp1:
|
|
image: "openfire:${OPENFIRE_TAG}"
|
|
ports:
|
|
- "5221:5222"
|
|
- "5261:5269"
|
|
- "7071:7070"
|
|
- "7441:7443"
|
|
- "9091:9090"
|
|
depends_on:
|
|
- "db1"
|
|
volumes:
|
|
- ./_data/xmpp/federated/1/conf:/var/lib/openfire/conf
|
|
- ./wait-for-it.sh:/wait-for-it.sh
|
|
command: ["/wait-for-it.sh", "-s", "db1:5432", "--", "/sbin/entrypoint.sh"]
|
|
networks:
|
|
openfire-federated-net:
|
|
ipv4_address: 172.50.0.10
|
|
extra_hosts:
|
|
- "xmpp1.localhost.example:172.50.0.10"
|
|
- "conference.xmpp1.localhost.example:172.50.0.10"
|
|
- "xmpp2.localhost.example:172.50.0.20"
|
|
- "conference.xmpp2.localhost.example:172.50.0.20"
|
|
|
|
xmpp2:
|
|
image: "openfire:${OPENFIRE_TAG}"
|
|
ports:
|
|
- "5222:5222"
|
|
- "5262:5269"
|
|
- "7072:7070"
|
|
- "7442:7443"
|
|
- "9092:9090"
|
|
depends_on:
|
|
- "db2"
|
|
volumes:
|
|
- ./_data/xmpp/federated/2/conf:/var/lib/openfire/conf
|
|
- ./wait-for-it.sh:/wait-for-it.sh
|
|
command: ["/wait-for-it.sh", "-s", "db2:5432", "--", "/sbin/entrypoint.sh"]
|
|
networks:
|
|
openfire-federated-net:
|
|
ipv4_address: 172.50.0.20
|
|
extra_hosts:
|
|
- "xmpp1.localhost.example:172.50.0.10"
|
|
- "conference.xmpp1.localhost.example:172.50.0.10"
|
|
- "xmpp2.localhost.example:172.50.0.20"
|
|
- "conference.xmpp2.localhost.example:172.50.0.20"
|
|
|
|
networks:
|
|
openfire-federated-net:
|
|
driver: bridge
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: 172.50.0.0/24
|
|
|