diff --git a/Makefile b/Makefile index 1715d73..6201390 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ generate_env: docker buildx build --load --tag generateconfig-env --file Dockerfile-generateconfig-env . - docker run --rm \ - --volume ${CURDIR}/:/code/ \ + docker run -l debug \ + --volume ${CURDIR}/:/code/:Z \ generateconfig-env start: generate_env diff --git a/docker-compose.yml b/docker-compose.yml index ac78214..3e57213 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,8 +5,8 @@ services: context: . dockerfile: Dockerfile-generateconfig-anyconf volumes: - - ./:/code - - "${STORAGE_DIR}:/code/storage" + - ./:/code:Z + - "${STORAGE_DIR}:/code/storage:Z" # processing any-sync-* configs generateconfig-processing: @@ -17,8 +17,8 @@ services: context: . dockerfile: Dockerfile-generateconfig-processing volumes: - - ./:/code - - "${STORAGE_DIR}:/code/storage" + - ./:/code:Z + - "${STORAGE_DIR}:/code/storage:Z" mongo-1: depends_on: @@ -28,7 +28,7 @@ services: restart: unless-stopped command: ["--replSet", "${MONGO_REPLICA_SET}", "--port", "${MONGO_1_PORT}"] volumes: - - "${STORAGE_DIR}/mongo-1/:/data/db" + - "${STORAGE_DIR}/mongo-1/:/data/db:Z" 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 interval: 10s @@ -42,7 +42,7 @@ services: 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"] volumes: - - "${STORAGE_DIR}/redis/:/data/" + - "${STORAGE_DIR}/redis/:/data/:Z" healthcheck: test: [ "CMD", "redis-cli", "--raw", "-p", "${REDIS_PORT}", "incr", "ping" ] interval: 10s @@ -57,7 +57,7 @@ services: MINIO_ROOT_USER: "${AWS_ACCESS_KEY_ID}" MINIO_ROOT_PASSWORD: "${AWS_SECRET_ACCESS_KEY}" volumes: - - "${STORAGE_DIR}/minio:/data" + - "${STORAGE_DIR}/minio:/data:Z" healthcheck: test: bash -c ':> /dev/tcp/127.0.0.1/${MINIO_PORT}' || exit 1 interval: 5s @@ -87,7 +87,7 @@ services: mongo-1: condition: service_healthy volumes: - - ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/ + - ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/:Z restart: "no" 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" - 8005:8000 volumes: - - ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/ - - "${STORAGE_DIR}/networkStore/any-sync-coordinator/:/networkStore/" + - ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/:Z + - "${STORAGE_DIR}/networkStore/any-sync-coordinator/:/networkStore/:Z" deploy: resources: limits: @@ -127,9 +127,9 @@ services: - "${ANY_SYNC_FILENODE_QUIC_PORT}:${ANY_SYNC_FILENODE_QUIC_PORT}/udp" - 8004:8000 volumes: - - ./etc/any-sync-filenode/:/etc/any-sync-filenode/ + - ./etc/any-sync-filenode/:/etc/any-sync-filenode/:Z - ./etc/.aws:/root/.aws:ro - - "${STORAGE_DIR}/networkStore/any-sync-filenode/:/networkStore/" + - "${STORAGE_DIR}/networkStore/any-sync-filenode/:/networkStore/:Z" deploy: resources: limits: @@ -147,9 +147,9 @@ services: - 8081:8080 - 8001:8000 volumes: - - ./etc/any-sync-node-1/:/etc/any-sync-node/ - - "${STORAGE_DIR}/any-sync-node-1/:/storage/" - - "${STORAGE_DIR}/networkStore/any-sync-node-1/:/networkStore/" + - ./etc/any-sync-node-1/:/etc/any-sync-node/:Z + - "${STORAGE_DIR}/any-sync-node-1/:/storage/:Z" + - "${STORAGE_DIR}/networkStore/any-sync-node-1/:/networkStore/:Z" deploy: resources: limits: @@ -167,9 +167,9 @@ services: - 8082:8080 - 8002:8000 volumes: - - ./etc/any-sync-node-2/:/etc/any-sync-node/ - - "${STORAGE_DIR}/any-sync-node-2/:/storage/" - - "${STORAGE_DIR}/networkStore/any-sync-node-2/:/networkStore/" + - ./etc/any-sync-node-2/:/etc/any-sync-node/:Z + - "${STORAGE_DIR}/any-sync-node-2/:/storage/:Z" + - "${STORAGE_DIR}/networkStore/any-sync-node-2/:/networkStore/:Z" deploy: resources: limits: @@ -187,9 +187,9 @@ services: - 8083:8080 - 8003:8000 volumes: - - ./etc/any-sync-node-3/:/etc/any-sync-node/ - - "${STORAGE_DIR}/any-sync-node-3/:/storage/" - - "${STORAGE_DIR}/networkStore/any-sync-node-3/:/networkStore/" + - ./etc/any-sync-node-3/:/etc/any-sync-node/:Z + - "${STORAGE_DIR}/any-sync-node-3/:/storage/:Z" + - "${STORAGE_DIR}/networkStore/any-sync-node-3/:/networkStore/:Z" deploy: resources: limits: @@ -206,8 +206,8 @@ services: - "${ANY_SYNC_CONSENSUSNODE_QUIC_PORT}:${ANY_SYNC_CONSENSUSNODE_QUIC_PORT}/udp" - 8006:8000 volumes: - - ./etc/any-sync-consensusnode/:/etc/any-sync-consensusnode/ - - "${STORAGE_DIR}/networkStore/any-sync-consensusnode/:/networkStore/" + - ./etc/any-sync-consensusnode/:/etc/any-sync-consensusnode/:Z + - "${STORAGE_DIR}/networkStore/any-sync-consensusnode/:/networkStore/:Z" deploy: resources: limits: @@ -226,8 +226,8 @@ services: - any-sync-node-2 - any-sync-node-3 volumes: - - ./:/code - - "${STORAGE_DIR}:/code/storage" + - ./:/code:Z + - "${STORAGE_DIR}:/code/storage:Z" command: ["tail", "-f", "/dev/null"] stop_signal: SIGKILL tty: true