Update 4 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s
This commit is contained in:
@@ -39,6 +39,23 @@ echo "Generating Filebeat configuration..."
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
bash "$SCRIPT_DIR/scripts/generate-config.sh" || _die "Failed to generate configuration"
|
||||
|
||||
# Create Docker volumes
|
||||
CONFIG_VOLUME="${CONFIG_VOLUME:-${CONTAINER_NAME}_config}"
|
||||
DATA_VOLUME="${DATA_VOLUME:-${CONTAINER_NAME}_data}"
|
||||
CERTS_VOLUME="${CERTS_VOLUME:-${CONTAINER_NAME}_certs}"
|
||||
|
||||
echo "Creating Docker volumes..."
|
||||
docker volume create "$CONFIG_VOLUME" >/dev/null 2>&1 || true
|
||||
docker volume create "$DATA_VOLUME" >/dev/null 2>&1 || true
|
||||
docker volume create "$CERTS_VOLUME" >/dev/null 2>&1 || true
|
||||
|
||||
# Copy config to volume
|
||||
if [ -f "${CONFIG_PATH}/filebeat.yml" ]; then
|
||||
echo "Copying configuration to Docker volume..."
|
||||
docker run --rm -v "${CONFIG_VOLUME}:/config" -v "${CONFIG_PATH}:/source:ro" alpine \
|
||||
cp /source/filebeat.yml /config/filebeat.yml
|
||||
fi
|
||||
|
||||
# Start the new container
|
||||
bash ./start.sh || _die "Failed to start Filebeat"
|
||||
|
||||
|
Reference in New Issue
Block a user