Changeset View
Changeset View
Standalone View
Standalone View
docker-compose.storage-replica.yml
- This file was added.
version: '2' | |||||
services: | |||||
# override web app to use the replica | |||||
swh-web: | |||||
environment: | |||||
SWH_CONFIG_FILENAME: /web-replica.yml | |||||
volumes: | |||||
- "./conf/web-replica.yml:/web-replica.yml:ro" | |||||
depends_on: | |||||
- swh-storage-replica | |||||
# create a dedicated db for the replica | |||||
swh-storage-replica-db: | |||||
image: postgres:11 | |||||
env_file: | |||||
- ./env/storage-db-replica.env | |||||
environment: | |||||
# unset PGHOST as db service crashes otherwise | |||||
PGHOST: | |||||
# and an RPC server | |||||
swh-storage-replica: | |||||
build: ./ | |||||
image: swh/stack | |||||
depends_on: | |||||
- swh-storage-replica-db | |||||
- swh-objstorage | |||||
env_file: | |||||
- ./env/storage-db-replica.env | |||||
environment: | |||||
SWH_CONFIG_FILENAME: /storage-replica.yml | |||||
volumes: | |||||
- "./conf/storage-replica.yml:/storage-replica.yml:ro" | |||||
- "./services/swh-storage/entrypoint.sh:/entrypoint.sh:ro" | |||||
# and the background process that keeps the replica in sync with the | |||||
# main graph | |||||
swh-storage-replica-replayer: | |||||
build: ./ | |||||
image: swh/stack | |||||
depends_on: | |||||
- swh-storage-replica-db | |||||
- swh-objstorage | |||||
env_file: | |||||
- ./env/storage-db-replica.env | |||||
environment: | |||||
SWH_CONFIG_FILENAME: /storage-replica.yml | |||||
volumes: | |||||
- "./conf/storage-replica.yml:/storage-replica.yml:ro" | |||||
- "./services/swh-storage-replayer/entrypoint.sh:/entrypoint.sh:ro" |