mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
fix docker compose running with no such file error (#519)
* fix docker compose running with no such file error * fix observability docker compose
This commit is contained in:
@@ -14,18 +14,27 @@
|
|||||||
|
|
||||||
services:
|
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:
|
tempo:
|
||||||
image: grafana/tempo:latest
|
image: grafana/tempo:latest
|
||||||
#user: root # The container must be started with root to execute chown in the script
|
user: "10001" # The container must be started with root to execute chown in the script
|
||||||
#entrypoint: [ "/etc/tempo/entrypoint.sh" ] # Specify a custom entry point
|
|
||||||
command: [ "-config.file=/etc/tempo.yaml" ] # This is passed as a parameter to the entry point script
|
command: [ "-config.file=/etc/tempo.yaml" ] # This is passed as a parameter to the entry point script
|
||||||
volumes:
|
volumes:
|
||||||
- ./tempo-entrypoint.sh:/etc/tempo/entrypoint.sh # Mount entry point script
|
- ./tempo.yaml:/etc/tempo.yaml:ro
|
||||||
- ./tempo.yaml:/etc/tempo.yaml
|
|
||||||
- ./tempo-data:/var/tempo
|
- ./tempo-data:/var/tempo
|
||||||
ports:
|
ports:
|
||||||
- "3200:3200" # tempo
|
- "3200:3200" # tempo
|
||||||
- "24317:4317" # otlp grpc
|
- "24317:4317" # otlp grpc
|
||||||
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- otel-network
|
- otel-network
|
||||||
|
|
||||||
|
|||||||
@@ -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 "$@"
|
|
||||||
+4
-2
@@ -41,7 +41,7 @@ services:
|
|||||||
- rustfs_data_1:/data/rustfs1
|
- rustfs_data_1:/data/rustfs1
|
||||||
- rustfs_data_2:/data/rustfs2
|
- rustfs_data_2:/data/rustfs2
|
||||||
- rustfs_data_3:/data/rustfs3
|
- rustfs_data_3:/data/rustfs3
|
||||||
- ./logs:/app/logs
|
- logs_data:/app/logs
|
||||||
networks:
|
networks:
|
||||||
- rustfs-network
|
- rustfs-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -95,7 +95,7 @@ services:
|
|||||||
command:
|
command:
|
||||||
- --config=/etc/otelcol-contrib/otel-collector.yml
|
- --config=/etc/otelcol-contrib/otel-collector.yml
|
||||||
volumes:
|
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:
|
ports:
|
||||||
- "4317:4317" # OTLP gRPC receiver
|
- "4317:4317" # OTLP gRPC receiver
|
||||||
- "4318:4318" # OTLP HTTP receiver
|
- "4318:4318" # OTLP HTTP receiver
|
||||||
@@ -219,3 +219,5 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
redis_data:
|
redis_data:
|
||||||
driver: local
|
driver: local
|
||||||
|
logs_data:
|
||||||
|
driver: local
|
||||||
|
|||||||
@@ -56,4 +56,5 @@ if [ "${RUSTFS_ACCESS_KEY}" = "rustfsadmin" ] || [ "${RUSTFS_SECRET_KEY}" = "rus
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting: $*"
|
echo "Starting: $*"
|
||||||
|
set -- "$@" $LOCAL_VOLUMES
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user