mirror of
https://github.com/anyproto/any-sync-dockercompose.git
synced 2025-06-08 14:07:02 +09:00
docker-compose.yml added selinux support
This commit is contained in:
parent
b7ed956afe
commit
9cd2275b23
1 changed files with 24 additions and 24 deletions
|
@ -5,8 +5,8 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-generateconfig-anyconf
|
dockerfile: Dockerfile-generateconfig-anyconf
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/code
|
- ./:/code:Z
|
||||||
- "${STORAGE_DIR}:/code/storage"
|
- "${STORAGE_DIR}:/code/storage:Z"
|
||||||
|
|
||||||
# processing any-sync-* configs
|
# processing any-sync-* configs
|
||||||
generateconfig-processing:
|
generateconfig-processing:
|
||||||
|
@ -17,8 +17,8 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile-generateconfig-processing
|
dockerfile: Dockerfile-generateconfig-processing
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/code
|
- ./:/code:Z
|
||||||
- "${STORAGE_DIR}:/code/storage"
|
- "${STORAGE_DIR}:/code/storage:Z"
|
||||||
|
|
||||||
mongo-1:
|
mongo-1:
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -28,7 +28,7 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["--replSet", "${MONGO_REPLICA_SET}", "--port", "${MONGO_1_PORT}"]
|
command: ["--replSet", "${MONGO_REPLICA_SET}", "--port", "${MONGO_1_PORT}"]
|
||||||
volumes:
|
volumes:
|
||||||
- "${STORAGE_DIR}/mongo-1/:/data/db"
|
- "${STORAGE_DIR}/mongo-1:/data/db:Z"
|
||||||
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
|
||||||
|
@ -42,7 +42,7 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["redis-server", "--port", "${REDIS_PORT}", "--dir", "/data/", "--appendonly", "yes", "--maxmemory", "${REDIS_MAXMEMORY}", "--maxmemory-policy", "noeviction", "--protected-mode", "no", "--loadmodule", "/opt/redis-stack/lib/redisbloom.so"]
|
command: ["redis-server", "--port", "${REDIS_PORT}", "--dir", "/data/", "--appendonly", "yes", "--maxmemory", "${REDIS_MAXMEMORY}", "--maxmemory-policy", "noeviction", "--protected-mode", "no", "--loadmodule", "/opt/redis-stack/lib/redisbloom.so"]
|
||||||
volumes:
|
volumes:
|
||||||
- "${STORAGE_DIR}/redis/:/data/"
|
- "${STORAGE_DIR}/redis:/data:Z"
|
||||||
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
|
||||||
|
@ -57,7 +57,7 @@ services:
|
||||||
MINIO_ROOT_USER: "${AWS_ACCESS_KEY_ID}"
|
MINIO_ROOT_USER: "${AWS_ACCESS_KEY_ID}"
|
||||||
MINIO_ROOT_PASSWORD: "${AWS_SECRET_ACCESS_KEY}"
|
MINIO_ROOT_PASSWORD: "${AWS_SECRET_ACCESS_KEY}"
|
||||||
volumes:
|
volumes:
|
||||||
- "${STORAGE_DIR}/minio:/data"
|
- "${STORAGE_DIR}/minio:/data:Z"
|
||||||
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
|
||||||
|
@ -87,7 +87,7 @@ services:
|
||||||
mongo-1:
|
mongo-1:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/
|
- ./etc/any-sync-coordinator:/etc/any-sync-coordinator:Z
|
||||||
restart: "no"
|
restart: "no"
|
||||||
command: ["/bin/any-sync-confapply", "-c", "/etc/any-sync-coordinator/config.yml", "-n", "/etc/any-sync-coordinator/network.yml", "-e"]
|
command: ["/bin/any-sync-confapply", "-c", "/etc/any-sync-coordinator/config.yml", "-n", "/etc/any-sync-coordinator/network.yml", "-e"]
|
||||||
|
|
||||||
|
@ -105,8 +105,8 @@ services:
|
||||||
- "${ANY_SYNC_COORDINATOR_QUIC_PORT}:${ANY_SYNC_COORDINATOR_QUIC_PORT}/udp"
|
- "${ANY_SYNC_COORDINATOR_QUIC_PORT}:${ANY_SYNC_COORDINATOR_QUIC_PORT}/udp"
|
||||||
- "${ANY_SYNC_COORDINATOR_METRIC_ADDR}:8000"
|
- "${ANY_SYNC_COORDINATOR_METRIC_ADDR}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/
|
- ./etc/any-sync-coordinator:/etc/any-sync-coordinator:Z
|
||||||
- "${STORAGE_DIR}/networkStore/any-sync-coordinator/:/networkStore/"
|
- "${STORAGE_DIR}/networkStore/any-sync-coordinator:/networkStore:Z"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -127,9 +127,9 @@ services:
|
||||||
- "${ANY_SYNC_FILENODE_QUIC_PORT}:${ANY_SYNC_FILENODE_QUIC_PORT}/udp"
|
- "${ANY_SYNC_FILENODE_QUIC_PORT}:${ANY_SYNC_FILENODE_QUIC_PORT}/udp"
|
||||||
- "${ANY_SYNC_FILENODE_METRIC_ADDR}:8000"
|
- "${ANY_SYNC_FILENODE_METRIC_ADDR}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-filenode/:/etc/any-sync-filenode/
|
- ./etc/any-sync-filenode:/etc/any-sync-filenode:Z
|
||||||
- ./etc/.aws:/root/.aws:ro
|
- ./etc/.aws:/root/.aws:ro
|
||||||
- "${STORAGE_DIR}/networkStore/any-sync-filenode/:/networkStore/"
|
- "${STORAGE_DIR}/networkStore/any-sync-filenode:/networkStore:Z"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -147,9 +147,9 @@ services:
|
||||||
- "${ANY_SYNC_NODE_1_API_SERVER_ADDR}:8080"
|
- "${ANY_SYNC_NODE_1_API_SERVER_ADDR}:8080"
|
||||||
- "${ANY_SYNC_NODE_1_METRIC_ADDR}:8000"
|
- "${ANY_SYNC_NODE_1_METRIC_ADDR}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-node-1/:/etc/any-sync-node/
|
- ./etc/any-sync-node-1:/etc/any-sync-node:Z
|
||||||
- "${STORAGE_DIR}/any-sync-node-1/:/storage/"
|
- "${STORAGE_DIR}/any-sync-node-1:/storage:Z"
|
||||||
- "${STORAGE_DIR}/networkStore/any-sync-node-1/:/networkStore/"
|
- "${STORAGE_DIR}/networkStore/any-sync-node-1:/networkStore:Z"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -167,9 +167,9 @@ services:
|
||||||
- "${ANY_SYNC_NODE_2_API_SERVER_ADDR}:8080"
|
- "${ANY_SYNC_NODE_2_API_SERVER_ADDR}:8080"
|
||||||
- "${ANY_SYNC_NODE_2_METRIC_ADDR}:8000"
|
- "${ANY_SYNC_NODE_2_METRIC_ADDR}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-node-2/:/etc/any-sync-node/
|
- ./etc/any-sync-node-2:/etc/any-sync-node:Z
|
||||||
- "${STORAGE_DIR}/any-sync-node-2/:/storage/"
|
- "${STORAGE_DIR}/any-sync-node-2:/storage:Z"
|
||||||
- "${STORAGE_DIR}/networkStore/any-sync-node-2/:/networkStore/"
|
- "${STORAGE_DIR}/networkStore/any-sync-node-2:/networkStore:Z"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -187,9 +187,9 @@ services:
|
||||||
- "${ANY_SYNC_NODE_3_API_SERVER_ADDR}:8080"
|
- "${ANY_SYNC_NODE_3_API_SERVER_ADDR}:8080"
|
||||||
- "${ANY_SYNC_NODE_3_METRIC_ADDR}:8000"
|
- "${ANY_SYNC_NODE_3_METRIC_ADDR}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-node-3/:/etc/any-sync-node/
|
- ./etc/any-sync-node-3:/etc/any-sync-node:Z
|
||||||
- "${STORAGE_DIR}/any-sync-node-3/:/storage/"
|
- "${STORAGE_DIR}/any-sync-node-3:/storage:Z"
|
||||||
- "${STORAGE_DIR}/networkStore/any-sync-node-3/:/networkStore/"
|
- "${STORAGE_DIR}/networkStore/any-sync-node-3:/networkStore:Z"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -206,8 +206,8 @@ services:
|
||||||
- "${ANY_SYNC_CONSENSUSNODE_QUIC_PORT}:${ANY_SYNC_CONSENSUSNODE_QUIC_PORT}/udp"
|
- "${ANY_SYNC_CONSENSUSNODE_QUIC_PORT}:${ANY_SYNC_CONSENSUSNODE_QUIC_PORT}/udp"
|
||||||
- "${ANY_SYNC_CONSENSUSNODE_METRIC_ADDR}:8000"
|
- "${ANY_SYNC_CONSENSUSNODE_METRIC_ADDR}:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./etc/any-sync-consensusnode/:/etc/any-sync-consensusnode/
|
- ./etc/any-sync-consensusnode:/etc/any-sync-consensusnode:Z
|
||||||
- "${STORAGE_DIR}/networkStore/any-sync-consensusnode/:/networkStore/"
|
- "${STORAGE_DIR}/networkStore/any-sync-consensusnode:/networkStore:Z"
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
@ -227,7 +227,7 @@ services:
|
||||||
- any-sync-node-2
|
- any-sync-node-2
|
||||||
- any-sync-node-3
|
- any-sync-node-3
|
||||||
volumes:
|
volumes:
|
||||||
- "${STORAGE_DIR}:/code/storage"
|
- "${STORAGE_DIR}:/code/storage:Z"
|
||||||
command: ["tail", "-f", "/dev/null"]
|
command: ["tail", "-f", "/dev/null"]
|
||||||
stop_signal: SIGKILL
|
stop_signal: SIGKILL
|
||||||
tty: true
|
tty: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue