diff --git a/.docker/observability/docker-compose.yml b/.docker/observability/docker-compose.yml index 0c843c6f..c86d3542 100644 --- a/.docker/observability/docker-compose.yml +++ b/.docker/observability/docker-compose.yml @@ -14,18 +14,27 @@ services: + tempo-init: + image: busybox:latest + command: ["sh", "-c", "chown -R 10001:10001 /var/tempo"] + volumes: + - ./tempo-data:/var/tempo + user: root + networks: + - otel-network + restart: "no" + tempo: image: grafana/tempo:latest - #user: root # The container must be started with root to execute chown in the script - #entrypoint: [ "/etc/tempo/entrypoint.sh" ] # Specify a custom entry point + user: "10001" # The container must be started with root to execute chown in the script command: [ "-config.file=/etc/tempo.yaml" ] # This is passed as a parameter to the entry point script volumes: - - ./tempo-entrypoint.sh:/etc/tempo/entrypoint.sh # Mount entry point script - - ./tempo.yaml:/etc/tempo.yaml + - ./tempo.yaml:/etc/tempo.yaml:ro - ./tempo-data:/var/tempo ports: - "3200:3200" # tempo - "24317:4317" # otlp grpc + restart: unless-stopped networks: - otel-network @@ -94,4 +103,4 @@ networks: driver: bridge name: "network_otel_config" driver_opts: - com.docker.network.enable_ipv6: "true" + com.docker.network.enable_ipv6: "true" diff --git a/.docker/observability/tempo-entrypoint.sh b/.docker/observability/tempo-entrypoint.sh deleted file mode 100755 index 002c8e1c..00000000 --- a/.docker/observability/tempo-entrypoint.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Run as root to fix directory permissions -chown -R 10001:10001 /var/tempo - -# Use su-exec (a lightweight sudo/gosu alternative, commonly used in Alpine mirroring) -# Switch to user 10001 and execute the original command (CMD) passed to the script -# "$@" represents all parameters passed to this script, i.e. command in docker-compose -exec su-exec 10001:10001 /tempo "$@" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0f76d6ae..af16483f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,7 @@ services: - rustfs_data_1:/data/rustfs1 - rustfs_data_2:/data/rustfs2 - rustfs_data_3:/data/rustfs3 - - ./logs:/app/logs + - logs_data:/app/logs networks: - rustfs-network restart: unless-stopped @@ -95,7 +95,7 @@ services: command: - --config=/etc/otelcol-contrib/otel-collector.yml volumes: - - ./.docker/observability/otel-collector.yml:/etc/otelcol-contrib/otel-collector.yml:ro + - ./.docker/observability/otel-collector-config.yaml:/etc/otelcol-contrib/otel-collector.yml:ro ports: - "4317:4317" # OTLP gRPC receiver - "4318:4318" # OTLP HTTP receiver @@ -219,3 +219,5 @@ volumes: driver: local redis_data: driver: local + logs_data: + driver: local diff --git a/entrypoint.sh b/entrypoint.sh index 20adef69..dd70c8ec 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -56,4 +56,5 @@ if [ "${RUSTFS_ACCESS_KEY}" = "rustfsadmin" ] || [ "${RUSTFS_SECRET_KEY}" = "rus fi echo "Starting: $*" +set -- "$@" $LOCAL_VOLUMES exec "$@"