mirror of
https://github.com/anyproto/any-sync-dockercompose.git
synced 2025-06-08 05:47:03 +09:00
added STORAGE_DIR
This commit is contained in:
parent
9ab192ebd0
commit
ed0667d7c3
2 changed files with 17 additions and 12 deletions
|
@ -67,3 +67,5 @@ MONGO_URL=${MONGO_CONNECT}/?replicaSet=${MONGO_REPLICA_SET}
|
||||||
REDIS_HOST=redis
|
REDIS_HOST=redis
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
REDIS_URL="redis://${REDIS_HOST}:${REDIS_PORT}?dial_timeout=3&read_timeout=6s"
|
REDIS_URL="redis://${REDIS_HOST}:${REDIS_PORT}?dial_timeout=3&read_timeout=6s"
|
||||||
|
|
||||||
|
STORAGE_DIR="./storage"
|
||||||
|
|
|
@ -7,6 +7,7 @@ services:
|
||||||
dockerfile: Dockerfile-generateconfig-anyconf
|
dockerfile: Dockerfile-generateconfig-anyconf
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/code
|
- ./:/code
|
||||||
|
- "${STORAGE_DIR}:/code/storage"
|
||||||
|
|
||||||
# processing any-sync-* configs
|
# processing any-sync-* configs
|
||||||
generateconfig-processing:
|
generateconfig-processing:
|
||||||
|
@ -19,6 +20,7 @@ services:
|
||||||
dockerfile: Dockerfile-generateconfig-processing
|
dockerfile: Dockerfile-generateconfig-processing
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/code
|
- ./:/code
|
||||||
|
- "${STORAGE_DIR}:/code/storage"
|
||||||
|
|
||||||
mongo-1:
|
mongo-1:
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -29,7 +31,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "${MONGO_1_PORT}:${MONGO_1_PORT}"
|
- "${MONGO_1_PORT}:${MONGO_1_PORT}"
|
||||||
volumes:
|
volumes:
|
||||||
- ./storage/mongo-1/:/data/db
|
- "${STORAGE_DIR}/mongo-1/:/data/db"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: test $$(mongosh --port ${MONGO_1_PORT} --quiet --eval "try {rs.initiate({_id:'${MONGO_REPLICA_SET}',members:[{_id:0,host:\"mongo-1:${MONGO_1_PORT}\"}]})} catch(e) {rs.status().ok}") -eq 1
|
test: test $$(mongosh --port ${MONGO_1_PORT} --quiet --eval "try {rs.initiate({_id:'${MONGO_REPLICA_SET}',members:[{_id:0,host:\"mongo-1:${MONGO_1_PORT}\"}]})} catch(e) {rs.status().ok}") -eq 1
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
@ -45,7 +47,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "${REDIS_PORT}:${REDIS_PORT}"
|
- "${REDIS_PORT}:${REDIS_PORT}"
|
||||||
volumes:
|
volumes:
|
||||||
- ./storage/redis/:/data/
|
- "${STORAGE_DIR}/redis/:/data/"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "redis-cli", "--raw", "-p", "${REDIS_PORT}", "incr", "ping" ]
|
test: [ "CMD", "redis-cli", "--raw", "-p", "${REDIS_PORT}", "incr", "ping" ]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
|
@ -63,7 +65,7 @@ services:
|
||||||
- "${EXTERNAL_MINIO_PORT}:${MINIO_PORT}"
|
- "${EXTERNAL_MINIO_PORT}:${MINIO_PORT}"
|
||||||
- "${EXTERNAL_MINIO_WEB_PORT}:${MINIO_WEB_PORT}"
|
- "${EXTERNAL_MINIO_WEB_PORT}:${MINIO_WEB_PORT}"
|
||||||
volumes:
|
volumes:
|
||||||
- ./storage/minio:/data
|
- "${STORAGE_DIR}/minio:/data"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: bash -c ':> /dev/tcp/127.0.0.1/${MINIO_PORT}' || exit 1
|
test: bash -c ':> /dev/tcp/127.0.0.1/${MINIO_PORT}' || exit 1
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
@ -113,7 +115,7 @@ services:
|
||||||
- 8005:8000
|
- 8005:8000
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/
|
- ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/
|
||||||
- ./storage/networkStore/any-sync-coordinator/:/networkStore/
|
- "${STORAGE_DIR}/networkStore/any-sync-coordinator/:/networkStore/"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -136,7 +138,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-filenode/:/etc/any-sync-filenode/
|
- ./etc/any-sync-filenode/:/etc/any-sync-filenode/
|
||||||
- ./etc/.aws:/root/.aws:ro
|
- ./etc/.aws:/root/.aws:ro
|
||||||
- ./storage/networkStore/any-sync-filenode/:/networkStore/
|
- "${STORAGE_DIR}/networkStore/any-sync-filenode/:/networkStore/"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -155,8 +157,8 @@ services:
|
||||||
- 8001:8000
|
- 8001:8000
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-node-1/:/etc/any-sync-node/
|
- ./etc/any-sync-node-1/:/etc/any-sync-node/
|
||||||
- ./storage/any-sync-node-1/:/storage/
|
- "${STORAGE_DIR}/any-sync-node-1/:/storage/"
|
||||||
- ./storage/networkStore/any-sync-node-1/:/networkStore/
|
- "${STORAGE_DIR}/networkStore/any-sync-node-1/:/networkStore/"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -175,8 +177,8 @@ services:
|
||||||
- 8002:8000
|
- 8002:8000
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-node-2/:/etc/any-sync-node/
|
- ./etc/any-sync-node-2/:/etc/any-sync-node/
|
||||||
- ./storage/any-sync-node-2/:/storage/
|
- "${STORAGE_DIR}/any-sync-node-2/:/storage/"
|
||||||
- ./storage/networkStore/any-sync-node-2/:/networkStore/
|
- "${STORAGE_DIR}/networkStore/any-sync-node-2/:/networkStore/"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -195,8 +197,8 @@ services:
|
||||||
- 8003:8000
|
- 8003:8000
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-node-3/:/etc/any-sync-node/
|
- ./etc/any-sync-node-3/:/etc/any-sync-node/
|
||||||
- ./storage/any-sync-node-3/:/storage/
|
- "${STORAGE_DIR}/any-sync-node-3/:/storage/"
|
||||||
- ./storage/networkStore/any-sync-node-3/:/networkStore/
|
- "${STORAGE_DIR}/networkStore/any-sync-node-3/:/networkStore/"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -214,7 +216,7 @@ services:
|
||||||
- 8006:8000
|
- 8006:8000
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-consensusnode/:/etc/any-sync-consensusnode/
|
- ./etc/any-sync-consensusnode/:/etc/any-sync-consensusnode/
|
||||||
- ./storage/networkStore/any-sync-consensusnode/:/networkStore/
|
- "${STORAGE_DIR}/networkStore/any-sync-consensusnode/:/networkStore/"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -233,6 +235,7 @@ services:
|
||||||
- any-sync-node-3
|
- any-sync-node-3
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/code
|
- ./:/code
|
||||||
|
- "${STORAGE_DIR}:/code/storage"
|
||||||
command: "tail -f /dev/null"
|
command: "tail -f /dev/null"
|
||||||
tty: true
|
tty: true
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue